We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1c30b81 commit 475e2e0Copy full SHA for 475e2e0
test/run.go.spec.ts
@@ -0,0 +1,26 @@
1
+import {execRun} from '../src/tasks/run'
2
+import {expect} from 'chai'
3
+
4
+describe('run - golang', () => {
5
+ it('.go file runs correctly', () => {
6
+ execRun({
7
+ id: 28,
8
+ lang: 'golang',
9
+ source: (new Buffer(`
10
+ package main;
11
12
+ import "fmt";
13
14
+ func main() {
15
+ var text string
16
+ fmt.Scanf("%s", &text)
17
+ fmt.Println("Hello " + text)
18
+ }
19
20
+ `)).toString('base64'),
21
+ stdin: (new Buffer('World')).toString('base64')
22
+ }, (runResult) => {
23
+ expect(new Buffer(runResult.stdout, 'base64').toString('ascii')).to.eq('Hello World')
24
+ })
25
26
+})
0 commit comments