forked from vim-test/vim-test
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsbttest_spec.vim
98 lines (70 loc) · 2.26 KB
/
sbttest_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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
source spec/support/helpers.vim
describe "SBT"
before
cd spec/fixtures/sbt
end
after
call Teardown()
cd -
end
it "runs when filename matches *Test.scala"
view FixtureTest.scala
TestFile
Expect g:test#last_command == 'sbt "testOnly *FixtureTest"'
end
it "runs when filename matches *Spec.scala"
view FixtureSpec.scala
TestFile
Expect g:test#last_command == 'sbt "testOnly *FixtureSpec"'
end
it "runs when filename matches *Suite.scala"
view FixtureSuite.scala
TestFile
Expect g:test#last_command == 'sbt "testOnly *FixtureSuite"'
end
it "runs when filename matches Test*.scala"
view TestFixture.scala
TestFile
Expect g:test#last_command == 'sbt "testOnly *TestFixture"'
end
it "runs when filename matches Suite*.scala"
view SuiteFixture.scala
TestFile
Expect g:test#last_command == 'sbt "testOnly *SuiteFixture"'
end
it "runs when filename matches *test*.scala"
view whatever_test_smth.scala
TestFile
Expect g:test#last_command == 'sbt "testOnly *whatever_test_smth"'
end
it "runs when filename matches *suite*.scala"
view whatever_suite_smth.scala
TestFile
Expect g:test#last_command == 'sbt "testOnly *whatever_suite_smth"'
end
it "runs nearest tests for FunSuite style"
view +32 FixtureTestSuite.scala
TestNearest
Expect g:test#last_command == 'sbt "testOnly *FixtureTestSuite -- -z \"Assert '."\\'".'add'."\\'".' works for Double and returns Double\""'
end
it "runs nearest tests for FlatSpec style"
view +14 FixtureSpec.scala
TestNearest
Expect g:test#last_command == 'sbt "testOnly *FixtureSpec -- -z \"throw NoSuchElementException if an empty stack is popped\""'
end
it "runs nearest tests for first test in FlatSpec style"
view +6 FixtureSpec.scala
TestNearest
Expect g:test#last_command == 'sbt "testOnly *FixtureSpec -- -z \"A Stack should pop values in last-in-first-out order\""'
end
it "runs nearest tests for first test in WordSpec style"
view +7 WordSpec.scala
TestNearest
Expect g:test#last_command == 'sbt "testOnly *WordSpec -- -z \"have size 0\""'
end
it "runs a suite"
view FixtureTestSuite.scala
TestSuite
Expect g:test#last_command == 'sbt "test"'
end
end