File tree Expand file tree Collapse file tree 3 files changed +24
-1
lines changed Expand file tree Collapse file tree 3 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ Currently supported grammars are:
18
18
| AppleScript | Yes | Yes | |
19
19
| Babel ES6 JS | Yes | Yes | |
20
20
| Bash | Yes | Yes | The shell used is based on your default ` $SHELL ` environment variable |
21
+ | Bash Automated Test System (Bats) | Yes | Yes | |
21
22
| Batch | Yes | | |
22
23
| Behat Feature | Yes | | |
23
24
| BuckleScript | Yes | Yes | |
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bats
2
+
3
+ @test " addition using bc" {
4
+ result=" $( echo 2+2 | bc) "
5
+ [ " $result " -eq 4 ]
6
+ }
7
+
8
+ @test " addition using dc" {
9
+ result=" $( echo 2 2+p | dc) "
10
+ [ " $result " -eq 4 ]
11
+ }
Original file line number Diff line number Diff line change @@ -44,6 +44,17 @@ module.exports =
44
44
command : " babel-node"
45
45
args : (context ) -> [context .filepath ]
46
46
47
+ ' Bash Automated Test System (Bats)' :
48
+ " File Based" :
49
+ command : " bats"
50
+ args : (context ) -> [context .filepath ]
51
+ " Selection Based" :
52
+ command : ' bats'
53
+ args : (context ) ->
54
+ code = context .getCode (true )
55
+ tmpFile = GrammarUtils .createTempFileWithCode (code)
56
+ [tmpFile]
57
+
47
58
Batch :
48
59
" File Based" :
49
60
command : " cmd.exe"
@@ -168,7 +179,7 @@ module.exports =
168
179
' File Based' :
169
180
command : ' coffee'
170
181
args : (context ) -> [context .filepath ]
171
-
182
+
172
183
" Common Lisp" :
173
184
" File Based" :
174
185
command : " clisp"
You can’t perform that action at this time.
0 commit comments