git @ Cat's Eye Technologies Quylthulg / a9b9565
Test appliances, plus dedicated script to run this using Hugs. Chris Pressey 1 year, 4 months ago
7 changed file(s) with 41 addition(s) and 33 deletion(s). Raw diff Collapse all Expand all
00 *.hi
11 *.o
22 *.jsmod
3 bin/*
3 bin/qlzqqlzuup
44 demo/qlzqqlzuup.js
0 #!/bin/sh
1
2 THIS=`realpath $0`
3 DIR=`dirname $THIS`/../src
4 runhugs $DIR/Main.hs $*
11
22 PROG=qlzqqlzuup
33
4 if [ x`which ghc` = x -a x`which runhugs` = x ]; then
5 echo "Neither ghc nor runhugs found on search path."
6 exit 1
4 if command -v ghc >/dev/null 2>&1; then
5 echo "building $PROG with ghc"
6 (cd src && ghc --make Main.hs -o ../bin/$PROG)
7 else
8 echo "ghc not found, not building $PROG"
79 fi
810
9 mkdir -p bin
10
11 if [ x`which ghc` = x -o ! x$USE_HUGS = x ]; then
12 # create script to run with Hugs
13 cat >bin/$PROG <<'EOF'
14 #!/bin/sh
15 THIS=`realpath $0`
16 DIR=`dirname $THIS`/../src
17 runhugs $DIR/Main.hs $*
18 EOF
19 chmod 755 bin/$PROG
11 if command -v hastec >/dev/null 2>&1; then
12 echo "building $PROG.js with hastec"
13 (cd src && hastec --make HasteMain.hs -o ../demo/$PROG.js)
2014 else
21 (cd src && ghc --make Main.hs -o ../bin/$PROG)
15 echo "hastec not found, not building $PROG.js"
2216 fi
23
24 ### haste
25 (cd src && hastec --make HasteMain.hs -o ../demo/qlzqqlzuup.js)
00 #!/bin/sh
11
2 ./build.sh || exit 1
3
4 falderal tests/Quylthulg.markdown
2 APPLIANCES=""
3 if [ -x bin/qlzqqlzuup ]; then
4 APPLIANCES="$APPLIANCES tests/appliances/qlzqqlzuup.md"
5 fi
6 if command -v runhugs >/dev/null 2>&1; then
7 APPLIANCES="$APPLIANCES tests/appliances/qlzqqlzuup_hugs.md"
8 fi
9 if [ "${APPLIANCES}x" = x ]; then
10 echo "Neither bin/qlzqqlzuup executable nor runhugs found on search path."
11 exit 1
12 fi
13 falderal $APPLIANCES tests/Quylthulg.markdown
44 exhaustive, but provides a basic sanity check that the language I've designed
55 here comes close to what I had in mind.
66
7 Quylthulg Tests
8 ---------------
9
107 -> Tests for functionality "Interpret Quylthulg Program"
11
12 -> Functionality "Interpret Quylthulg Program" is implemented by
13 -> shell command
14 -> "bin/qlzqqlzuup %(test-body-file)"
15
16 -> Functionality "Interpret Quylthulg Program" is implemented by
17 -> shell command
18 -> "bin/qlzqqlzuup -m %(test-body-file)"
198
209 Integer expressions.
2110 --------------------
0 -> Functionality "Interpret Quylthulg Program" is implemented by
1 -> shell command
2 -> "bin/qlzqqlzuup %(test-body-file)"
3
4 -> Functionality "Interpret Quylthulg Program" is implemented by
5 -> shell command
6 -> "bin/qlzqqlzuup -m %(test-body-file)"
0 -> Functionality "Interpret Quylthulg Program" is implemented by
1 -> shell command
2 -> "bin/qlzqqlzuup_hugs %(test-body-file)"
3
4 -> Functionality "Interpret Quylthulg Program" is implemented by
5 -> shell command
6 -> "bin/qlzqqlzuup_hugs -m %(test-body-file)"