Skip to content

Commit aa5901a

Browse files
committed
Add support for csharp
1 parent 2cab407 commit aa5901a

File tree

14 files changed

+64
-0
lines changed

14 files changed

+64
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Currently we have following images -
1919

2020
- [c](containers/c)
2121
- [cpp](containers/cpp)
22+
- [c#](containers/csharp)
2223
- [java8](containers/java8)
2324
- [nodejs6](containers/nodejs6)
2425
- [nodejs](containers/nodejs8)

containers/csharp/Dockerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM alpine:edge
2+
3+
RUN echo "@testing http://dl-4.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
4+
&& apk add --update mono@testing bash
5+
6+
COPY ./compile.sh /bin/compile.sh
7+
COPY ./run.sh /bin/run.sh
8+
9+
RUN chmod 777 /bin/compile.sh; \
10+
chmod 777 /bin/run.sh

containers/csharp/compile.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/env bash
2+
3+
csc Program.cs 2> compile.stderr 1> compile.stdout

containers/csharp/run.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env bash
2+
3+
chmod 777 Program.exe
4+
mono Program.exe < run.stdin 1> run.stdout 2> run.stderr

tests/csharp/Program.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
using System;
2+
3+
public class HelloWorld {
4+
static public void Main () {
5+
Console.WriteLine ("Hello " + Console.ReadLine());
6+
}
7+
}

tests/csharp/run.stdin

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
World

tests/csharp/runbox/Program.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
using System;
2+
3+
public class HelloWorld {
4+
static public void Main () {
5+
Console.WriteLine ("Hello " + Console.ReadLine());
6+
}
7+
}

tests/csharp/runbox/Program.exe

3.5 KB
Binary file not shown.

tests/csharp/runbox/compile.stderr

Whitespace-only changes.

tests/csharp/runbox/compile.stdout

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Microsoft (R) Visual C# Compiler version 2.6.0.62309 (d3f6b8e7)
2+
Copyright (C) Microsoft Corporation. All rights reserved.
3+

0 commit comments

Comments
 (0)