From c98fa64378de518980c1fb2a658ec9d6250cd7ba Mon Sep 17 00:00:00 2001 From: Lassi Kortela Date: Sat, 28 Dec 2019 01:46:02 +0200 Subject: [PATCH] Add Gambit test script --- .gitignore | 2 ++ test-chibi.scm => test-r7rs.scm | 5 +---- test.sh | 15 ++++++++++----- 3 files changed, 13 insertions(+), 9 deletions(-) rename test-chibi.scm => test-r7rs.scm (82%) diff --git a/.gitignore b/.gitignore index edd567f..90b1430 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ +/*.c +/*.o* /test*.tar diff --git a/test-chibi.scm b/test-r7rs.scm similarity index 82% rename from test-chibi.scm rename to test-r7rs.scm index e6de675..b212296 100755 --- a/test-chibi.scm +++ b/test-r7rs.scm @@ -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))) diff --git a/test.sh b/test.sh index a78be35..6edf69b 100755 --- a/test.sh +++ b/test.sh @@ -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