forked from vim-test/vim-test
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstacktest_multipackage_spec.vim
79 lines (57 loc) · 2.24 KB
/
stacktest_multipackage_spec.vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
source spec/support/helpers.vim
describe "STACK (multi-package)"
before
cd spec/fixtures/stack/multi-package
end
after
call Teardown()
cd -
end
it "TestSuite detects correct subpackage (1)"
view subpackage1/test/Spec.hs
TestSuite
Expect g:test#last_command == "stack test subpackage1"
end
it "TestSuite detects correct subpackage (2)"
view subpackage2/test/Spec.hs
TestSuite
Expect g:test#last_command == "stack test subpackage2"
end
it "TestSuite detects correct subpackage in subdirectory"
view common/subpackage3/test/Spec.hs
TestSuite
Expect g:test#last_command == "stack test subpackage3"
end
it "TestFile detects fully qualified module name and correct subpackage (1)"
view subpackage1/test/Fix1/FixtureSpec.hs
TestFile
Expect g:test#last_command == "stack test subpackage1 --test-arguments '-m \"Fix1.Fixture\"'"
end
it "TestFile detects fully qualified module name and correct subpackage (2)"
view subpackage2/test/Fix2/FixtureSpec.hs
TestFile
Expect g:test#last_command == "stack test subpackage2 --test-arguments '-m \"Fix2.Fixture\"'"
end
it "TestFile detects fully qualified module name and correct subpackage (in subdirectory)"
view common/subpackage3/test/Fix3/FixtureSpec.hs
TestFile
Expect g:test#last_command == "stack test subpackage3 --test-arguments '-m \"Fix3.Fixture\"'"
end
it "TestNearest runs nearest 'it' test and detects correct subpackage"
view +11 subpackage1/test/Fix1/FixtureSpec.hs
TestNearest
Expect g:test#last_command == "stack test subpackage1 --test-arguments '-m \"returns the first element of a list\"'"
end
it "TestNearest runs nearest 'prop' test and detects correct subpackage"
view +13 subpackage1/test/Fix1/FixtureSpec.hs
TestNearest
Expect g:test#last_command == "stack test subpackage1 --test-arguments '-m \"returns the first element of an *arbitrary* list\"'"
end
" TODO
" it "TestNearest detects nested describes"
" view +17 subpackage1/test/Fix1/FixtureSpec.hs
" TestNearest
"
" Expect g:test#last_command == "stack test subpackage1 --test-arguments '-m \"Fix1.Fixture/Prelude.head/Empyt list/throws an exception if used with an empty list\"'"
" end
end