Add Python 3
authorMarius Gavrilescu <marius@ieval.ro>
Thu, 11 Feb 2016 23:00:03 +0000 (23:00 +0000)
committerMarius Gavrilescu <marius@ieval.ro>
Thu, 11 Feb 2016 23:00:03 +0000 (23:00 +0000)
MANIFEST
gruntmaster-compile
lib/Gruntmaster/Daemon.pm
t/problems/hello/tests/python3/meta.yml [new file with mode: 0644]
t/problems/hello/tests/python3/prog.py [new file with mode: 0755]

index 7b10ffa9e1867bfc701c991f769ccabdd9f3fe14..cd070032c08de17cd44467faf2888f505bec881d 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -128,6 +128,8 @@ t/problems/hello/tests/php/meta.yml
 t/problems/hello/tests/php/prog.php
 t/problems/hello/tests/python/meta.yml
 t/problems/hello/tests/python/prog.py
+t/problems/hello/tests/python3/meta.yml
+t/problems/hello/tests/python3/prog.py
 t/problems/hello/tests/ruby/meta.yml
 t/problems/hello/tests/ruby/prog.rb
 t/problems/hello/tests/rust/meta.yml
index adf2149705ee174356ed7d1912d5c6fbac64acd9..3be2013133ad5de1bf543d3f6e8cdcb448d45df4 100755 (executable)
@@ -41,7 +41,7 @@ given ($format){
                exit
        }
 
-       when ([qw/GOLFSCRIPT JULIA PERL PHP PYTHON RUBY SBCL/]){
+       when ([qw/GOLFSCRIPT JULIA PERL PHP PYTHON PYTHON3 RUBY SBCL/]){
                open IN, '<', $name;
                open OUT, '>', $basename;
                print OUT "#!/usr/bin/golfscript\n"                                                             if $_ eq 'GOLFSCRIPT';
@@ -49,6 +49,7 @@ given ($format){
                print OUT "#!/usr/bin/perl\n"                                                                   if $_ eq 'PERL';
                print OUT "#!/usr/bin/php -d ONLINE_JUDGE=true\n"                                               if $_ eq 'PHP';
                print OUT "#!/usr/bin/python2.7\n"                                                              if $_ eq 'PYTHON';
+               print OUT "#!/usr/bin/python3\n"                                                                if $_ eq 'PYTHON3';
                print OUT "#!/usr/bin/ruby\n"                                                                   if $_ eq 'RUBY';
                print OUT "#!/usr/bin/sbcl --script\n"                                                          if $_ eq 'SBCL';
                print OUT while <IN>;
index 2af9b5306a78229d334deaa819bd2b0fd30ece26..7a9dea668726a655c55ae36951dae459fa6bac04 100644 (file)
@@ -34,6 +34,7 @@ use constant FORMAT_EXTENSION => {
        PERL => 'pl',
        PHP => 'php',
        PYTHON => 'py',
+       PYTHON3 => 'py',
        RUBY => 'rb',
        RUST => 'rs',
        SBCL => 'l',
diff --git a/t/problems/hello/tests/python3/meta.yml b/t/problems/hello/tests/python3/meta.yml
new file mode 100644 (file)
index 0000000..bd3603d
--- /dev/null
@@ -0,0 +1,7 @@
+test_name: Python3
+test_description: Hello world in Python3
+problem: hello
+files:
+  prog:
+    format: PYTHON3
+    name: prog.py
diff --git a/t/problems/hello/tests/python3/prog.py b/t/problems/hello/tests/python3/prog.py
new file mode 100755 (executable)
index 0000000..2378708
--- /dev/null
@@ -0,0 +1,2 @@
+#!/usr/bin/python3
+print('Hello World!')
This page took 0.013982 seconds and 4 git commands to generate.