key-kill-mode: a page-mode for blocking keyup and keydown events
[conkeror.git] / tests / simple / casual-spelling.js
blob71bcfb73a9e31a7f7cd2a65210ba695ecfeaff9a
2 require("walnut.js");
3 require("casual-spelling");
5 walnut_run({
6     test_translate_1: function () {
7         assert_equals(casual_spelling.translate("\u00e1"), "a");
8     },
9     test_text_match_1: function () {
10         assert_objects_equal(casual_spelling.hints_text_match("", ""),
11                              [0,0]);
12     },
13     test_text_match_2: function () {
14         assert_objects_equal(casual_spelling.hints_text_match("a", "a"),
15                              [0,1]);
16     },
17     test_text_match_3: function () {
18         assert_objects_equal(casual_spelling.hints_text_match("a", "b"),
19                              false);
20     },
21     test_text_match_4: function () {
22         assert_objects_equal(casual_spelling.hints_text_match("\u00e1", "a"),
23                              [0,1]);
24     },
25     test_text_match_5: function () {
26         assert_objects_equal(casual_spelling.hints_text_match("aa", "aa"),
27                              [0,2]);
28     }
29 });