fdlint 0.2.0.pre → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +36 -15
  4. data/Rakefile +1 -1
  5. data/bin/fdlint +30 -9
  6. data/lib/fdlint/cli.rb +62 -10
  7. data/lib/fdlint/helper/logger.rb +1 -1
  8. data/lib/fdlint/log_entry.rb +14 -0
  9. data/lib/fdlint/parser/html/html_parser.rb +10 -12
  10. data/lib/fdlint/parser/html/query.rb +64 -50
  11. data/lib/fdlint/parser/html/struct.rb +20 -3
  12. data/lib/fdlint/parser/parser_visitable.rb +11 -5
  13. data/lib/fdlint/printer/base_printer.rb +6 -0
  14. data/lib/fdlint/printer/console_printer.rb +15 -23
  15. data/lib/fdlint/rule.rb +4 -4
  16. data/lib/fdlint/support/core/object.rb +6 -0
  17. data/lib/fdlint/support/core_ext.rb +1 -0
  18. data/lib/fdlint/validator.rb +60 -8
  19. data/lib/fdlint/version.rb +1 -1
  20. data/lib/hook/git_pre_commit +18 -0
  21. data/rules.d/css.rule.rb +1 -1
  22. data/rules.d/filename.rule.rb +3 -1
  23. data/rules.d/html.rule.rb +45 -32
  24. data/rules.d/js.rule.rb +2 -2
  25. data/test/all_tests.rb +28 -42
  26. data/test/css/mac_line_end_support_test.rb +10 -12
  27. data/test/css/parser_test.rb +4 -5
  28. data/test/css/rule/check_encoding_test.rb +7 -8
  29. data/test/css/rule/check_list_rule_test.rb +85 -102
  30. data/test/css/rule/file_name_test.rb +18 -39
  31. data/test/default_test.rb +1 -14
  32. data/test/fixtures/css/ad.css +0 -0
  33. data/test/fixtures/css/adver/test.css +0 -0
  34. data/test/fixtures/css/camelCase.css +0 -0
  35. data/test/fixtures/css/min/ad.css +0 -0
  36. data/test/fixtures/css/min/ad.min.css +0 -0
  37. data/test/fixtures/html/mixed_log_levels.html +1 -0
  38. data/test/fixtures/html/mixed_types.html +3 -0
  39. data/test/helper.rb +116 -16
  40. data/test/html/mixed_type_test.rb +14 -20
  41. data/test/html/parser/parse_comment_test.rb +4 -4
  42. data/test/html/parser/parse_dtd_test.rb +7 -7
  43. data/test/html/parser/parse_script_tag_test.rb +21 -14
  44. data/test/html/parser/parse_with_auto_close_tag_test.rb +12 -10
  45. data/test/html/parser/parse_with_diff_case_test.rb +8 -9
  46. data/test/html/parser/parse_with_emtpy_test.rb +5 -3
  47. data/test/html/parser/parse_with_multi_children_test.rb +4 -4
  48. data/test/html/parser/parse_with_multi_line_test.rb +5 -5
  49. data/test/html/parser/parse_with_prop_test.rb +10 -10
  50. data/test/html/parser/parse_with_script_tag_test.rb +4 -4
  51. data/test/html/parser/parse_with_selfclosing_test.rb +11 -11
  52. data/test/html/parser/parse_with_simple_tag_test.rb +7 -7
  53. data/test/html/parser/parse_with_simple_tree_test.rb +6 -6
  54. data/test/html/parser/parse_with_style_tag_test.rb +4 -4
  55. data/test/html/parser/parse_with_text_test.rb +7 -7
  56. data/test/html/parser_test.rb +19 -19
  57. data/test/html/query_test.rb +18 -18
  58. data/test/html/rule/check_block_level_element_test.rb +22 -24
  59. data/test/html/rule/check_button_test.rb +9 -9
  60. data/test/html/rule/check_css_in_head_test.rb +11 -32
  61. data/test/html/rule/check_dtd_test.rb +15 -11
  62. data/test/html/rule/check_form_element_name_test.rb +10 -9
  63. data/test/html/rule/check_head_contain_meta_and_title_test.rb +28 -34
  64. data/test/html/rule/check_hyperlink_with_target_test.rb +23 -17
  65. data/test/html/rule/check_hyperlink_with_title_test.rb +13 -20
  66. data/test/html/rule/check_id_n_class_downcase_test.rb +8 -19
  67. data/test/html/rule/check_img_with_alt_prop_test.rb +11 -12
  68. data/test/html/rule/check_no_import_css_test.rb +20 -20
  69. data/test/html/rule/check_prop_have_value_test.rb +9 -13
  70. data/test/html/rule/check_prop_seperator_test.rb +9 -13
  71. data/test/html/rule/check_style_prop_test.rb +7 -12
  72. data/test/html/rule/check_tag_closed_test.rb +15 -40
  73. data/test/html/rule/check_tag_downcase_test.rb +31 -28
  74. data/test/html/rule/check_unescape_char_test.rb +17 -17
  75. data/test/html/rule/check_unique_import_test.rb +15 -33
  76. data/test/html/rule_test.rb +2 -6
  77. data/test/js/expr/expr.rb +1 -1
  78. data/test/js/expr/left_hand.rb +1 -1
  79. data/test/js/expr/operate.rb +1 -1
  80. data/test/js/expr/primary.rb +1 -1
  81. data/test/js/parser_test.rb +3 -6
  82. data/test/js/rule/alert_check_test.rb +5 -19
  83. data/test/js/rule/base_test.rb +5 -19
  84. data/test/js/rule/jq_check_test.rb +26 -58
  85. data/test/js/rule/nest_try_catch_test.rb +26 -43
  86. data/test/js/rule/new_object_and_new_array_test.rb +5 -21
  87. data/test/js/rule/no_eval_test.rb +3 -19
  88. data/test/js/rule/no_global_test.rb +34 -73
  89. data/test/js/rule/private_method_check_test.rb +14 -43
  90. data/test/js/rule/semicolon_test.rb +18 -47
  91. data/test/js/rule/stat_if_with_brace_test.rb +30 -53
  92. data/test/js/rule/stat_if_with_muti_else_test.rb +36 -53
  93. data/test/js/rule/use_strict_equal_test.rb +16 -29
  94. data/test/js/rule_test.rb +2 -4
  95. data/test/js/stat/if.rb +1 -1
  96. data/test/js/stat/iter.rb +1 -1
  97. data/test/js/stat/stat.rb +1 -1
  98. data/test/js/stat/switch.rb +1 -1
  99. data/test/js/stat/try.rb +1 -1
  100. data/test/js/stat/var.rb +1 -1
  101. data/test/parser_visitable_test.rb +14 -36
  102. data/test/position_info_test.rb +4 -5
  103. data/test/runner/log_level_test.rb +30 -25
  104. metadata +11 -14
  105. data/lib/fdlint/file_validator.rb +0 -38
  106. data/lib/fdlint/parser/html/rule/check_tag_rule.rb +0 -80
  107. data/test/css/rule/compression_test.rb +0 -53
  108. data/test/html/rule/check_class_count_test.rb +0 -36
  109. data/test/html/rule/check_html_template_test.rb +0 -103
  110. data/test/js/rule/all_test.rb +0 -23
  111. data/test/js/rule/file_checker_test.rb +0 -131
  112. data/test/rule_dsl/dsl_basic_test.rb +0 -91
  113. data/test/rule_dsl/importing_test.rb +0 -48
  114. data/test/test_helper.rb +0 -9
@@ -1,29 +1,28 @@
1
1
  # encoding: utf-8
2
2
  require_relative 'base_test'
3
3
 
4
- require 'js/rule/checklist'
5
-
6
- module XRayTest
4
+ module FdlintTest
7
5
  module JS
8
6
  module Rule
9
7
 
10
8
  class NestTryCatchTest < BaseTest
11
9
 
12
- def test_ok
13
- js = '
14
- try {
15
-
16
- } catch (e) {
17
-
18
- }
19
- '
20
- ret = visit js
21
- assert_equal [], ret
22
- end
10
+ check_rule [:warn, 'try catch一般不允许嵌套,若嵌套,需要充分的理由'] do
11
+ should_with_result do
12
+ [
13
+ 'try {
14
+ if (a > 0) {
15
+ }
16
+ } finally {
17
+ try {
18
+
19
+ } catch (e) {
20
+
21
+ }
22
+ }
23
+ ',
23
24
 
24
- def test_fail
25
- js = '
26
- try {
25
+ 'try {
27
26
  if (a > 0) {
28
27
  try {
29
28
 
@@ -33,35 +32,19 @@ module XRayTest
33
32
  }
34
33
  } finally {
35
34
 
36
- }
37
- '
38
- ret = visit js
39
- assert_equal [['try catch一般不允许嵌套,若嵌套,需要充分的理由', :warn]], ret
40
- end
41
-
42
- def test_nest_in_finnally_part
43
- js = '
44
- try {
45
- if (a > 0) {
46
- }
47
- } finally {
35
+ }'
36
+ ]
37
+ end
38
+
39
+ should_without_result do
40
+ '
48
41
  try {
49
-
42
+
50
43
  } catch (e) {
51
44
 
52
- }
53
- }
54
- '
55
- ret = visit js
56
- assert_equal [['try catch一般不允许嵌套,若嵌套,需要充分的理由', :warn]], ret
57
- end
58
-
59
- private
60
-
61
- def visit(js)
62
- stat = parse js, 'stat_try'
63
- rule = XRay::JS::Rule::ChecklistRule.new
64
- rule.visit_stat_try stat
45
+ }
46
+ '
47
+ end
65
48
  end
66
49
 
67
50
  end
@@ -1,34 +1,18 @@
1
1
  # encoding: utf-8
2
2
  require_relative 'base_test'
3
3
 
4
- require 'js/rule/checklist'
5
-
6
- module XRayTest
4
+ module FdlintTest
7
5
  module JS
8
6
  module Rule
9
7
 
10
8
  class NewObjectAndNewArrayTest < BaseTest
11
9
 
12
- def test_default
13
- js = '
14
- new Object();
15
- '
16
- ret = visit js
17
- assert_equal [['使用{}代替new Object()', :error]], ret
18
-
19
- js = '
20
- new Array();
21
- '
22
- ret = visit js
23
- assert_equal [['使用[]代替new Array()', :error]], ret
10
+ should_with_result [:error, '使用{}代替new Object()'] do
11
+ ['new Object()', 'new Object']
24
12
  end
25
-
26
- private
27
13
 
28
- def visit(js)
29
- expr = parse js, 'expr_new'
30
- rule = XRay::JS::Rule::ChecklistRule.new
31
- rule.visit_expr_new expr
14
+ should_with_result [:error, '使用[]代替new Array()'] do
15
+ ['new Array()', 'new Array']
32
16
  end
33
17
 
34
18
  end
@@ -1,30 +1,14 @@
1
1
  # encoding: utf-8
2
2
  require_relative 'base_test'
3
3
 
4
- require 'js/rule/checklist'
5
-
6
- module XRayTest
4
+ module FdlintTest
7
5
  module JS
8
6
  module Rule
9
7
 
10
8
  class NoEvalTest < BaseTest
11
-
12
- def test_no_eval
13
- js = 'eval("a = 1 + 2 + 3")'
14
- ret = visit js
15
- assert_equal [['不允许使用eval', :error]], ret
16
-
17
- js = 'window.eval("1 + 2 + 3")'
18
- ret = visit js
19
- assert_equal [['不允许使用eval', :error]], ret
20
- end
21
-
22
- private
23
9
 
24
- def visit(js)
25
- expr = parse js, 'expr_member'
26
- rule = XRay::JS::Rule::ChecklistRule.new
27
- rule.visit_expr_member expr
10
+ should_with_result [:error, '不允许使用eval'] do
11
+ ['eval("a = 1 + 2 + 3")', 'window.eval("1 + 2 + 3")']
28
12
  end
29
13
 
30
14
  end
@@ -1,84 +1,45 @@
1
1
  # encoding: utf-8
2
2
  require_relative 'base_test'
3
3
 
4
- require 'js/rule/no_global'
5
-
6
- module XRayTest
4
+ module FdlintTest
7
5
  module JS
8
6
  module Rule
9
7
 
10
8
  class NoGlobalTest < BaseTest
11
-
12
- class Parser < XRay::JS::Parser
13
- include XRay::ParserVisitable
14
- end
15
-
16
- def test_main
17
- js = '
18
- var a = 1;
19
- a++;
20
- function hello() {
21
- }
22
- if (a < 100) {
23
- var b;
24
- (function(k) {
25
- var c = 123;
26
-
27
- function d(j) {
28
- a = 1000;
29
- z = 200;
30
- k = 300;
31
- j = 400
32
- }
33
- })();
34
- }
35
- '
36
-
37
- ret = parse js
38
- assert_equal 4, ret.length
39
- assert_equal '(var,[(var=,a,1)],)', ret[0].node.text
40
- assert_equal 'hello', ret[1].node.text
41
- assert_equal '(var,[(var=,b,)],)', ret[2].node.text
42
- assert_equal '(=,z,200)', ret[3].node.text
43
- end
44
-
45
- def test_scope_in_other_function
46
- js = <<-JS
47
- /**
48
- * scope test fixture
49
- */
50
- (function($){
51
- function test(){
52
- var temp;
53
- }
54
9
 
55
- var _createSeperator = function(){
56
- var _self = this,
57
- menuEl = _self.get('menuEl');
58
- temp = [a,b,c];
59
- return new Node(temp).appendTo(menuEl);
60
-
61
- test = 123;
62
-
63
- //var temp2;
64
- temp2 = 234;
65
- };
66
-
67
- })(jQuery);
68
- JS
69
-
70
- ret = parse js
71
- assert_equal [
72
- "禁止使用未定义的变量(或全局变量)",
73
- "禁止使用未定义的变量(或全局变量)"
74
- ], ret.map(&:message)
75
- assert_equal '(=,temp,[a,b,c])', ret[0].node.text
76
- assert_equal '(=,temp2,234)', ret[1].node.text
77
-
78
- end
79
-
80
- def parse(js)
81
- parse_with_rule js, XRay::JS::Rule::NoGlobalRule
10
+ should_with_result [:error, '禁止使用未定义的变量(或全局变量)'] do
11
+ [
12
+ %Q{ var a = 1; },
13
+ %Q{ (function(k) {
14
+ var c = 123;
15
+
16
+ function d(j) {
17
+ a = 1000;
18
+ z = 200;
19
+ k = 300;
20
+ j = 400
21
+ }
22
+ })()
23
+ }, <<-SRC
24
+ /**
25
+ * scope test fixture
26
+ */
27
+ (function($){
28
+ function test(){
29
+ var temp;
30
+ }
31
+
32
+ var _createSeperator = function(){
33
+ var _self = this,
34
+ menuEl = _self.get('menuEl');
35
+
36
+ //global var
37
+ temp = [a,b,c];
38
+ return new Node(temp).appendTo(menuEl);
39
+ };
40
+ })(jQuery);
41
+ SRC
42
+ ]
82
43
  end
83
44
 
84
45
  end
@@ -1,54 +1,25 @@
1
1
  # encoding: utf-8
2
2
  require_relative 'base_test'
3
3
 
4
- require 'js/rule/checklist'
5
-
6
- module XRayTest
4
+ module FdlintTest
7
5
  module JS
8
6
  module Rule
9
7
 
10
8
  class PrivateMethodCheckTest < BaseTest
11
9
 
12
- def test_normal
13
- js = 'a.check("good")'
14
- ret = visit js
15
- assert_equal [], ret
16
- end
17
-
18
- def test_protected_called
19
- js = "a._check('good')"
20
- ret = visit js
21
- assert_equal 1, ret.length
22
- end
23
-
24
- def test_protected_called_via_apply
25
- js = "a._check.call(a, 'good')"
26
- ret = visit js
27
- assert_equal 1, ret.length
28
- end
29
-
30
- def test_private_called
31
- js = "a.__check('good')"
32
- ret = visit js
33
- assert_equal 1, ret.length
34
- end
35
-
36
- def test_good_case
37
- js = "this.__check('good')"
38
- ret = visit js
39
- assert_equal [], ret
40
-
41
- js = "self._check('good')"
42
- ret = visit js
43
- assert_equal [], ret
44
- end
45
-
46
- private
47
-
48
- def visit(js)
49
- expr = parse js, 'expr_member'
50
- rule = XRay::JS::Rule::ChecklistRule.new
51
- rule.send :visit_expr_member, expr
10
+ check_rule [:error, '禁止调用对象的私有方法'] do
11
+
12
+ should_with_result do
13
+ %w[a._check('good')
14
+ a._check.call(a,\ 'good')
15
+ a.__check('good')]
16
+ end
17
+
18
+ should_without_result do
19
+ %w[a.check("good")
20
+ this.__check('good')
21
+ self._check('good')]
22
+ end
52
23
  end
53
24
 
54
25
  end
@@ -1,59 +1,30 @@
1
1
  # encoding: utf-8
2
2
  require_relative 'base_test'
3
3
 
4
- require 'js/rule/checklist'
5
-
6
- module XRayTest
4
+ module FdlintTest
7
5
  module JS
8
6
  module Rule
9
7
 
10
8
  class SemicolonTest < BaseTest
11
- include XRay::JS::Rule
12
9
 
13
- def setup
14
- @msg = '所有语句结束带上分号'
15
- end
16
-
17
- def test_block
18
- js = '{
19
- i = i++;
20
- }'
10
+ check_rule [:error, '所有语句结束带上分号'] do
21
11
 
22
- ret = visit js, 'block'
23
- assert_equal [], ret
24
- end
25
-
26
- def test_empty
27
- ret = visit ';', 'empty'
28
- assert_equal [], ret
29
- end
30
-
31
- def test_var
32
- js = '
33
- var a = 1, b = 2
34
- a++;
35
- '
36
- ret = visit js, 'var'
37
- assert_equal [[@msg, :error]], ret
38
- end
39
-
40
- def test_expression
41
- js = '
42
- a = i + 1 + 2 + 3 * 9
43
- i++
44
- '
45
- ret = visit js, 'expression'
46
- assert_equal [[@msg, :error]], ret
47
- end
48
-
49
- private
50
-
51
- def visit(js, type)
52
- stat = parse js, :statement
53
- assert_equal type, stat.type
54
-
55
- rule = XRay::JS::Rule::ChecklistRule.new
56
- rule.visit_statement stat
12
+ should_with_result do
13
+ [
14
+ %Q{var a = 1, b = 2
15
+ a++;},
16
+
17
+ %Q{a = i + 1 + 2 + 3 * 9
18
+ i++}
19
+ ]
20
+ end
21
+
22
+ should_without_result do
23
+ [
24
+ %Q{ i = i++; },
25
+ ';'
26
+ ]
27
+ end
57
28
  end
58
29
 
59
30
  end
@@ -1,64 +1,41 @@
1
1
  # encoding: utf-8
2
2
  require_relative 'base_test'
3
3
 
4
- require 'js/rule/checklist'
5
-
6
- module XRayTest
4
+ module FdlintTest
7
5
  module JS
8
6
  module Rule
9
7
 
10
8
  class StatIfWithBraceTest < BaseTest
11
9
 
12
- def setup
13
- @msg = '所有条件区域必须用花括号括起来'
14
- end
15
-
16
- def test_ok
17
- js = '
18
- if (i == 0) {
19
- i++;
20
- } else {
21
- i--
22
- }
23
- '
24
- ret = visit js
25
- assert_equal [], ret
26
- end
27
-
28
- def test_fail_1
29
- js = '
30
- if (i > 0)
31
- i--
32
- hello();
33
- '
34
- ret = visit js
35
- assert_equal [[@msg, :error]], ret
36
- end
37
-
38
- def test_fail_2
39
- js = '
40
- if (hello()) {
41
- i--;
42
- } else i++;
43
-
44
- '
45
- ret = visit js
46
- assert_equal [[@msg, :error]], ret
47
- end
48
-
49
- def test_fail_3
50
- js = 'if (i) i--; else i++;'
51
-
52
- ret = visit js
53
- assert_equal [[@msg, :error]], ret
54
- end
55
-
56
- private
57
-
58
- def visit(js)
59
- stat = parse js, 'stat_if'
60
- rule = XRay::JS::Rule::ChecklistRule.new
61
- rule.visit_stat_if stat
10
+ check_rule [:error, '所有条件区域必须用花括号括起来'] do
11
+
12
+ should_with_result do
13
+ [
14
+ %Q{
15
+ if (hello()) {
16
+ i--;
17
+ } else i++;
18
+ },
19
+ %Q{
20
+ if (i > 0)
21
+ i--
22
+ hello();
23
+ }
24
+ ]
25
+ end
26
+
27
+ should_without_result do
28
+ [
29
+ %Q{
30
+ if (i == 0) {
31
+ i++;
32
+ } else {
33
+ i--
34
+ }
35
+ },
36
+ %Q{ 'if (i) i--; else i++;'}
37
+ ]
38
+ end
62
39
  end
63
40
 
64
41
  end
@@ -1,64 +1,47 @@
1
1
  # encoding: utf-8
2
2
  require_relative 'base_test'
3
3
 
4
- require 'js/rule/checklist'
5
-
6
- module XRayTest
4
+ module FdlintTest
7
5
  module JS
8
6
  module Rule
9
7
 
10
8
  class StatIfWithMutiElseTest < BaseTest
11
9
 
12
- def setup
13
- @msg = '3个条件及以上的条件语句用switch代替if else'
14
- end
15
-
16
- def test_ok
17
- js = '
18
- if (a > 0) {
19
-
20
- } else if (a > 10) {
21
-
22
- } else {
23
-
24
- }
25
- '
26
- ret = visit js
27
- assert_equal [], ret
28
- end
29
-
30
- def test_fail_1
31
- js = '
32
- if (a > 1) {
33
- } else if (a > 20) {
34
- } else if (a > 30) {
35
- } else {
36
- }
37
- '
38
- ret = visit js
39
- assert_equal [[@msg, :error]], ret
40
- end
41
-
42
- def test_fail_2
43
- js = '
44
- if (a > 2) {
45
- } else if (a > 40) {
46
- } else if (a > 50) {
47
- } else if (a > 60) {
48
- }
49
- '
50
- ret = visit js
51
- assert_equal [[@msg, :error]], ret
52
- end
53
-
54
-
55
-
56
- private
57
-
58
- def visit(js)
59
- stat = parse js, 'stat_if'
60
- rule = XRay::JS::Rule::ChecklistRule.new
61
- rule.visit_stat_if stat
10
+ check_rule [:error, '3个条件及以上的条件语句用switch代替if else'] do
11
+
12
+ should_with_result do
13
+ [
14
+ %Q{
15
+ if (a > 1) {
16
+ } else if (a > 20) {
17
+ } else if (a > 30) {
18
+ } else {
19
+ }
20
+ },
21
+
22
+ %Q{
23
+ if (a > 2) {
24
+ } else if (a > 40) {
25
+ } else if (a > 50) {
26
+ } else if (a > 60) {
27
+ }
28
+ }
29
+ ]
30
+ end
31
+
32
+ should_without_result do
33
+ [
34
+ %Q{
35
+ if (a > 0) {
36
+
37
+ } else if (a > 10) {
38
+
39
+ } else {
40
+
41
+ }
42
+ },
43
+ ].last
44
+ end
62
45
  end
63
46
 
64
47
  end
@@ -1,40 +1,27 @@
1
1
  # encoding: utf-8
2
2
  require_relative 'base_test'
3
3
 
4
- require 'js/rule/checklist'
5
-
6
- module XRayTest
4
+ module FdlintTest
7
5
  module JS
8
6
  module Rule
9
7
 
10
8
  class UseStrictEqualTest < BaseTest
11
9
 
12
- def test_ok
13
- js = 'i === 1 + 1 / 2'
14
- ret = visit js
15
- assert_equal [], ret
16
-
17
- js = 'i !== hello()'
18
- ret = visit js
19
- assert_equal [], ret
20
- end
21
-
22
- def test_fail
23
- js = 'i == 1 + 1 / 2'
24
- ret = visit js
25
- assert_equal [['避免使用==和!=操作符', :warn]], ret
26
-
27
- js = 'i != hello()'
28
- ret = visit js
29
- assert_equal [['避免使用==和!=操作符', :warn]], ret
30
- end
31
-
32
- private
33
-
34
- def visit(js)
35
- expr = parse js, 'expr_equal'
36
- rule = XRay::JS::Rule::ChecklistRule.new
37
- rule.visit_expr_equal expr
10
+ check_rule [:warn, '避免使用==和!=操作符'] do
11
+
12
+ should_with_result do
13
+ [
14
+ 'i == 1 + 1 / 2',
15
+ 'i != hello()'
16
+ ]
17
+ end
18
+
19
+ should_without_result do
20
+ [
21
+ 'i === 1 + 1 / 2',
22
+ 'i !== hello()'
23
+ ]
24
+ end
38
25
  end
39
26
 
40
27
  end