File tree 5 files changed +32
-2
lines changed
5 files changed +32
-2
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ install:
12
12
- npm install -D
13
13
- docker pull codingblocks/judge-worker-c
14
14
- docker pull codingblocks/judge-worker-cpp
15
+ - docker pull codingblocks/judge-worker-csharp
15
16
- docker pull codingblocks/judge-worker-java8
16
17
- docker pull codingblocks/judge-worker-py2
17
18
- docker pull codingblocks/judge-worker-py3
Original file line number Diff line number Diff line change @@ -24,6 +24,11 @@ exports = module.exports = {
24
24
CPU_SHARE : "0.5" ,
25
25
MEM_LIMIT : '100m'
26
26
} ,
27
+ 'csharp' : {
28
+ SOURCE_FILE : 'program.cs' ,
29
+ CPU_SHARE : '1.2' ,
30
+ MEM_LIMIT : '500m' ,
31
+ } ,
27
32
'py2' : {
28
33
SOURCE_FILE : 'script.py' ,
29
34
CPU_SHARE : "0.8" ,
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import {expect} from 'chai'
5
5
describe ( 'run - c' , ( ) => {
6
6
it ( '.c file runs correctly' , ( ) => {
7
7
execRun ( {
8
- id : 20 ,
8
+ id : 19 ,
9
9
lang : 'c' ,
10
10
source : ( new Buffer ( `
11
11
#include <stdio.h>
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import {expect} from 'chai'
5
5
describe ( 'run - cpp' , ( ) => {
6
6
it ( '.cpp file runs correctly' , ( ) => {
7
7
execRun ( {
8
- id : 21 ,
8
+ id : 20 ,
9
9
lang : 'cpp' ,
10
10
source : ( new Buffer ( `
11
11
#include <iostream>
Original file line number Diff line number Diff line change
1
+ import { execRun } from '../src/tasks/run'
2
+ import { expect } from 'chai'
3
+
4
+
5
+ describe ( 'run - csharp' , ( ) => {
6
+ it ( '.cs file runs correctly' , ( ) => {
7
+ execRun ( {
8
+ id : 21 ,
9
+ lang : 'csharp' ,
10
+ source : ( new Buffer ( `
11
+ using System;
12
+
13
+ public class HelloWorld {
14
+ static public void Main () {
15
+ Console.WriteLine ("Hello " + Console.ReadLine());
16
+ }
17
+ }
18
+ ` ) ) . toString ( 'base64' ) ,
19
+ stdin : ( new Buffer ( 'World' ) ) . toString ( 'base64' )
20
+ } , ( runResult ) => {
21
+ expect ( new Buffer ( runResult . stdout , 'base64' ) . toString ( 'ascii' ) ) . to . eq ( 'Hello World\n' )
22
+ } )
23
+ } )
24
+ } )
You can’t perform that action at this time.
0 commit comments