5 test_remove_duplicates_filter_1: function () {
7 assert_objects_equal(ar.filter(remove_duplicates_filter()), [1, 2, 3]);
9 test_get_home_directory_1: function () {
10 assert(get_home_directory() instanceof Ci.nsIFile);
12 test_splice_range_1: function () {
13 assert_objects_equal(splice_range([[1,3],[4,6],[7,10]], 2, 8),
19 test_string_format_1: function () {
20 assert_equals(string_format("", {}),
23 test_string_format_2: function () {
24 assert_equals(string_format("%a", {a: 'hello'}),
27 test_string_format_3: function () {
28 assert_equals(string_format("%a%a", {a: 'hello'}),
35 test_array_p_1: function () {
38 test_array_p_2: function () {
39 assert(array_p(Array()));
41 test_make_array_1: function () {
42 assert_objects_equal(make_array(undefined), []);
44 test_make_array_2: function () {
45 assert_objects_equal(make_array(null), [null]);
50 test_possibly_valid_url_1: function () {
51 assert_not(possibly_valid_url(""));
53 test_possibly_valid_url_2: function () {
54 assert_not(possibly_valid_url(" "));
56 test_possibly_valid_url_3: function () {
57 assert(possibly_valid_url("example"));
59 test_possibly_valid_url_4: function () {
60 assert(possibly_valid_url(" example "));
62 test_possibly_valid_url_5: function () {
63 assert_not(possibly_valid_url("example foo"));
65 test_possibly_valid_url_6: function () {
66 assert(possibly_valid_url("example/ foo"));
68 test_possibly_valid_url_7: function () {
69 assert_not(possibly_valid_url("example /foo"));
71 test_possibly_valid_url_8: function () {
72 assert(possibly_valid_url("/example foo"));
74 test_possibly_valid_url_9: function () {
75 assert(possibly_valid_url(" /example foo"));
77 test_possibly_valid_url_10: function () {
78 assert(possibly_valid_url(" ex/ample foo"));
80 test_possibly_valid_url_11: function () {
81 assert(possibly_valid_url("/"));