summaryrefslogtreecommitdiffstats
path: root/run_tests.fish
blob: 1005fac6cfa8930316647e1a968cf92ba1cd0e21 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env fish

set d (realpath (status dirname))

cd $d/bytecode
cargo build

cd $d

if test (count $argv) -gt 0
    set files $d/tests/$argv*
else
    set files $d/tests/*
end

for f in $files
    $d/bytecode/target/debug/bytecode (sml $d/main.sml -o /dev/stderr $f >/dev/null 2>| psub)
    set -l got $status
    if test $got -eq 42
        echo (basename -s.sml $f): PASS
    else
        echo (basename -s.sml $f): FAIL "(status $got)"
    end
end