Add Gambit test script

This commit is contained in:
Lassi Kortela 2019-12-28 01:46:02 +02:00
parent a63d9a7c1e
commit c98fa64378
3 changed files with 13 additions and 9 deletions

2
.gitignore vendored
View File

@ -1 +1,3 @@
/*.c
/*.o*
/test*.tar

View File

@ -1,4 +1,4 @@
#! /usr/bin/env chibi-scheme
#!
(import (scheme base)
(scheme file)
@ -17,9 +17,6 @@
whole
(loop (bytevector-append whole part))))))))
(tar-write-file "hello/world.text"
(slurp-binary-file "trivial-tar-writer.scm"))
(define (main arguments)
(for-each (lambda (file) (tar-write-file file (slurp-binary-file file)))
(cdr arguments)))

15
test.sh
View File

@ -1,9 +1,14 @@
#!/bin/sh
set -eux
./test-chibi.scm trivial-tar-writer.scm >test-our.tar
bsdtar -cf test-bsd.tar trivial-tar-writer.scm
gtar -cf test-gnu.tar trivial-tar-writer.scm
hexdump -C test-our.tar
set -eu
cd "$(dirname "$0")"
echo "Entering directory '$PWD'"
set -x
payload=trivial-tar-writer.scm
chibi-scheme -A . test-r7rs.scm $payload >test-chibi.tar
gsi-script . test-r7rs.scm $payload >test-gambit.tar
bsdtar -cf test-bsd.tar $payload
gtar -cf test-gnu.tar $payload
hexdump -C test-chibi.tar
echo
echo
echo