2024-02-18 01:11:33 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
check() {
|
|
|
|
#echo "$@"
|
|
|
|
FILE="$1"
|
|
|
|
shift
|
|
|
|
acme "$@" outformats.a || exit 1
|
|
|
|
cmp test.o "$FILE" || exit 1
|
|
|
|
rm test.o
|
|
|
|
}
|
|
|
|
|
|
|
|
# if neither -o nor -f are given, use format from "!to", which defaults to cbm:
|
2024-02-18 13:50:32 +00:00
|
|
|
check outformat-cbm.exp -DFORMAT=0
|
|
|
|
check outformat-plain.exp -DFORMAT=1
|
|
|
|
check outformat-cbm.exp -DFORMAT=2
|
|
|
|
check outformat-apple.exp -DFORMAT=3
|
2024-02-18 01:11:33 +00:00
|
|
|
|
|
|
|
# if -o or -f are given, format from "!to" should be ignored:
|
|
|
|
for f in 0 1 2 3 ; do
|
2024-02-18 13:50:32 +00:00
|
|
|
check outformat-plain.exp -DFORMAT=$f -f plain
|
|
|
|
check outformat-cbm.exp -DFORMAT=$f -f cbm
|
|
|
|
check outformat-apple.exp -DFORMAT=$f -f apple
|
|
|
|
check outformat-plain.exp -DFORMAT=$f -o test.o # defaults to plain
|
|
|
|
check outformat-plain.exp -DFORMAT=$f -o test.o -f plain
|
|
|
|
check outformat-cbm.exp -DFORMAT=$f -o test.o -f cbm
|
|
|
|
check outformat-apple.exp -DFORMAT=$f -o test.o -f apple
|
2024-02-18 01:11:33 +00:00
|
|
|
done
|