diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3b741fe..faca437 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,9 +9,9 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set up cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: /var/apt/cache/archives key: ${{runner.os}}-packages diff --git a/C/C#.cs b/CSharp/C#.cs similarity index 100% rename from C/C#.cs rename to CSharp/C#.cs diff --git a/Makefile b/Makefile index 67a34fa..b1d3d61 100644 --- a/Makefile +++ b/Makefile @@ -59,7 +59,7 @@ benchmarks = BENCHMARKS.md commands = $(shell awk -F[:,] '{printf $$2" "}' t/tests.json) ## Compile all languages -all: c cpp crystal cs d dart delphi go java kotlin nim pascal rust scala vala +all: c cpp crystal cs d dart go java kotlin nim pascal rust scala vala c: C/C.c; $(CC) $(CFLAGS) -o $(<:.c=.out) $< @@ -67,7 +67,7 @@ cpp: C/C++.cpp; $(CPP) $(CPPFLAGS) -o $(<:.cpp=.out) $< crystal: Crystal/Crystal.cr; $(CRYSTAL) $(CRYSTALFLAGS) -o $(<:.cr=.out) $< -cs: C/C\#.cs; $(CSC) $(CSCFLAGS) -out:$(<:.cs=.out) $< +cs: CSharp/C\#.cs; $(CSC) $(CSCFLAGS) -out:$(<:.cs=.out) $< d: D/D.d; $(DC) $(DCFLAGS) -of=$(<:.d=.out) $< diff --git a/t/tests.json b/t/tests.json index 80afb33..2a1ddbe 100644 --- a/t/tests.json +++ b/t/tests.json @@ -1,7 +1,7 @@ { "Awk": "awk -f Awk/Awk.awk", "Bash": "bash --noprofile --norc Shell/Bash.sh", - "C#": "mono C/C#.out", + "C#": "mono CSharp/C#.out", "C++": "C/C++.out", "CMake": "cmake -P CMake/CMake.cmake 2>&1", "C": "C/C.out", diff --git a/t/tests.t b/t/tests.t index 88f8043..fa3d76a 100755 --- a/t/tests.t +++ b/t/tests.t @@ -1,6 +1,5 @@ #!/usr/bin/env perl -use experimental 'for_list'; use JSON::Parse 'json_file_to_perl'; use Test::More; @@ -13,7 +12,7 @@ EOF plan tests => @ARGV ? $#ARGV + 1 : scalar keys %$tests; -foreach my($lang, $cmd) (%$tests) { +while (my($lang, $cmd) = each %$tests) { # If arguments are passed, run only the # tests for the languages listed in them @ARGV && next unless grep m/^\Q$lang\E$/i, @ARGV;