mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-18 21:29:19 +02:00
fix -xchibi.primitive and spurious output in snow-chibi (thanks Martin Hayman)
This commit is contained in:
parent
264cbc756f
commit
43d6d20598
4 changed files with 7 additions and 5 deletions
1
main.c
1
main.c
|
@ -362,6 +362,7 @@ sexp run_main (int argc, char **argv) {
|
||||||
arg = ((argv[i][2] == '\0') ? argv[++i] : argv[i]+2);
|
arg = ((argv[i][2] == '\0') ? argv[++i] : argv[i]+2);
|
||||||
if (c == 'x') {
|
if (c == 'x') {
|
||||||
if (strcmp(arg, "chibi.primitive") == 0) {
|
if (strcmp(arg, "chibi.primitive") == 0) {
|
||||||
|
argv[i][2] = '\0';
|
||||||
goto load_primitive;
|
goto load_primitive;
|
||||||
} else if (strcmp(arg, "scheme.small") == 0) {
|
} else if (strcmp(arg, "scheme.small") == 0) {
|
||||||
load_init(0);
|
load_init(0);
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
|
||||||
# Test chibi-scheme command-line options.
|
# Test chibi-scheme command-line options.
|
||||||
# Should be run from a standard build.
|
# Should be run from a standard build.
|
||||||
|
@ -12,13 +12,14 @@ run_chibi() {
|
||||||
}
|
}
|
||||||
|
|
||||||
for t in $TESTDIR/*.args; do
|
for t in $TESTDIR/*.args; do
|
||||||
IFS=$'\r\n' GLOBIGNORE='*' :; args=($(cat $t))
|
IFS=$'\n' read -d '' -r -a args < $t
|
||||||
run_chibi ${args[@]} 2> ${t%.args}.err > ${t%.args}.out
|
run_chibi "${args[@]}" 2> ${t%.args}.err > ${t%.args}.out
|
||||||
if diff -w -q ${t%.args}.out ${t%.args}.res \
|
if diff -w -q ${t%.args}.out ${t%.args}.res \
|
||||||
&& ([ ! -e ${t%.args}.err-res ] || \
|
&& ([ ! -e ${t%.args}.err-res ] || \
|
||||||
diff -w -q ${t%.args}.err ${t%.args}.err-res); then
|
diff -w -q ${t%.args}.err ${t%.args}.err-res); then
|
||||||
echo "[PASS] $(basename ${t%.args})"
|
echo "[PASS] $(basename ${t%.args})"
|
||||||
else
|
else
|
||||||
|
echo chibi "${args[@]}"
|
||||||
echo "[FAIL] $(basename ${t%.args})"
|
echo "[FAIL] $(basename ${t%.args})"
|
||||||
FAILURES=$((FAILURES + 1))
|
FAILURES=$((FAILURES + 1))
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
-x(chibi primitive)
|
-xchibi.primitive
|
||||||
-p(+ 2 2)
|
-p(+ 2 2)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
CHIBI=${CHIBI:-chibi-scheme}
|
CHIBI=${CHIBI:-chibi-scheme}
|
||||||
IMG=-isnow.img
|
IMG=-isnow.img
|
||||||
if [ -x ./chibi-scheme ] && ! type $CHIBI 2>/dev/null; then
|
if [ -x ./chibi-scheme ] && ! type $CHIBI >/dev/null 2>/dev/null; then
|
||||||
# convenience for running from dev, notable "make test-snow"
|
# convenience for running from dev, notable "make test-snow"
|
||||||
CHIBI="./chibi-scheme"
|
CHIBI="./chibi-scheme"
|
||||||
export LD_LIBRARY_PATH=".:${LD_LIBRARY_PATH}"
|
export LD_LIBRARY_PATH=".:${LD_LIBRARY_PATH}"
|
||||||
|
|
Loading…
Add table
Reference in a new issue