@@ -13,11 +13,10 @@ require "./spec_helper"
13
13
end
14
14
end
15
15
16
- {% for command in [" test" , " test-parallel" ] % }
17
- describe " the {{ command.id }} command" do
16
+ describe " the test command" do
18
17
describe " --preamble/-p" do
19
18
it " injects the given custom preamble, failing the neutral mutant" do
20
- result = run_crytic(" {{ command.id }} -s ./fixtures/conditionals/fully_covered.cr ./fixtures/conditionals/uncovered_spec.cr -p 'exit 1'" )
19
+ result = run_crytic(" test -s ./fixtures/conditionals/fully_covered.cr ./fixtures/conditionals/uncovered_spec.cr -p 'exit 1'" )
21
20
result.output.should contain(" unmodified subject" )
22
21
result.output.should_not contain(" ConditionFlip" )
23
22
result.exit_code.should eq 1
@@ -26,7 +25,7 @@ require "./spec_helper"
26
25
27
26
describe " with a fully covered subject" do
28
27
it " passes the mutation specs" do
29
- result = run_crytic(" {{ command.id }} -s ./fixtures/conditionals/fully_covered.cr ./fixtures/conditionals/fully_covered_spec.cr" )
28
+ result = run_crytic(" test -s ./fixtures/conditionals/fully_covered.cr ./fixtures/conditionals/fully_covered_spec.cr" )
30
29
result.output.should contain(" ✅ ConditionFlip" )
31
30
result.output.should contain(" ✅ BoolLiteralFlip" )
32
31
result.output.should contain(" 3 covered" )
@@ -36,22 +35,22 @@ require "./spec_helper"
36
35
37
36
describe " with an insufficiently covered subject" do
38
37
it " fails the mutation specs" do
39
- result = run_crytic(" {{ command.id }} -s ./fixtures/conditionals/fully_covered.cr ./fixtures/conditionals/uncovered_spec.cr" )
38
+ result = run_crytic(" test -s ./fixtures/conditionals/fully_covered.cr ./fixtures/conditionals/uncovered_spec.cr" )
40
39
result.output.should contain(" ❌ ConditionFlip" )
41
40
result.output.should contain(" ❌ BoolLiteralFlip" )
42
41
result.output.should contain(" 3 uncovered" )
43
42
result.exit_code.should be > 0
44
43
end
45
44
46
45
it " exits successfully when the msi threshold is set sufficiently" do
47
- result = run_crytic(" {{ command.id }} --min-msi=0.0 -s ./fixtures/conditionals/fully_covered.cr ./fixtures/conditionals/uncovered_spec.cr" )
46
+ result = run_crytic(" test --min-msi=0.0 -s ./fixtures/conditionals/fully_covered.cr ./fixtures/conditionals/uncovered_spec.cr" )
48
47
result.exit_code.should eq 0
49
48
end
50
49
end
51
50
52
51
describe " without passing a subject or tests" do
53
52
it " mutates all sources and runs all tests" do
54
- result = run_crytic_in_dir(" ./fixtures/autofind" , {{ command }} )
53
+ result = run_crytic_in_dir(" ./fixtures/autofind" , " test " )
55
54
result.output.should contain(" ✅ ConditionFlip" )
56
55
result.output.should contain(" ✅ BoolLiteralFlip" )
57
56
result.output.should contain(" ✅ NumberLiteralSignFlip" )
@@ -65,7 +64,7 @@ require "./spec_helper"
65
64
66
65
describe " subject without any coverage" do
67
66
it " fails all mutants" do
68
- result = run_crytic(" {{ command.id }} -s ./fixtures/uncovered/without.cr ./fixtures/uncovered/without_spec.cr" )
67
+ result = run_crytic(" test -s ./fixtures/uncovered/without.cr ./fixtures/uncovered/without_spec.cr" )
69
68
result.output.should contain(" ❌ BoolLiteralFlip" )
70
69
result.output.should contain(" ❌ ConditionFlip" )
71
70
result.output.should contain(" ❌ NumberLiteralSignFlip" )
@@ -77,7 +76,7 @@ require "./spec_helper"
77
76
78
77
describe " a failing initial test suite" do
79
78
it " reports initial failure" do
80
- result = run_crytic(" {{ command.id }} -s ./fixtures/uncovered/without.cr ./fixtures/failing/failing_spec.cr" )
79
+ result = run_crytic(" test -s ./fixtures/uncovered/without.cr ./fixtures/failing/failing_spec.cr" )
81
80
result.output.should contain " ❌ Original test suite failed.\n "
82
81
result.output.should contain " no overload matches"
83
82
result.exit_code.should be > 0
@@ -86,14 +85,13 @@ require "./spec_helper"
86
85
87
86
describe " a subject that is mutated into an endless loop" do
88
87
it " finishes and reports a timed out spec" do
89
- result = run_crytic(" {{ command.id }} -s ./fixtures/timeout/timeout.cr ./fixtures/timeout/timeout_spec.cr" )
88
+ result = run_crytic(" test -s ./fixtures/timeout/timeout.cr ./fixtures/timeout/timeout_spec.cr" )
90
89
result.output.should contain " ✅ Original test suite passed.\n "
91
90
result.output.should contain " 1 timeout"
92
91
result.exit_code.should be > 0
93
92
end
94
93
end
95
94
end
96
- {% end % }
97
95
98
96
describe " the noop command" do
99
97
it " outputs the noop'ed code to stdout" do
0 commit comments