Skip to content

Commit 0420e9a

Browse files
VibhorCodecianGuptaVibhorCodecianGupta
VibhorCodecianGupta
authored and
VibhorCodecianGupta
committed
perl spec
1 parent ded70f5 commit 0420e9a

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

config.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ exports = module.exports = {
5353
SOURCE_FILE: 'script.rb',
5454
CPU_SHARE: "0.8",
5555
MEM_LIMIT: '300m'
56+
},
57+
'perl': {
58+
SOURCE_FILE: 'script.pl',
59+
CPU_SHARE: "0.8",
60+
MEM_LIMIT: '300m'
5661
}
5762
}
58-
}
63+
}

test/run.perl.spec.ts

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import {execRun} from '../src/tasks/run'
2+
import {expect} from 'chai'
3+
4+
5+
describe('run - perl', () => {
6+
it('.pl file runs correctly', () => {
7+
execRun({
8+
id: 28,
9+
lang: 'perl',
10+
source: (new Buffer(`
11+
$input = <STDIN>;
12+
print "Hello ${input}";
13+
`)).toString('base64'),
14+
stdin: (new Buffer('World')).toString('base64')
15+
}, (runResult) => {
16+
expect(new Buffer(runResult.stdout, 'base64').toString('ascii')).to.eq('Hello World')
17+
})
18+
})
19+
})

0 commit comments

Comments
 (0)