Rename some test scripts

This commit is contained in:
Lassi Kortela 2021-08-17 14:14:04 +03:00
parent 58eab27434
commit aacc580f7a
2 changed files with 50 additions and 0 deletions

View File

@ -0,0 +1,25 @@
#! /
(import (scheme base)
(scheme file)
(scheme process-context)
(scheme read)
(scheme write)
(lassik trivial-tar-writer))
(define (slurp-binary-file filename)
(call-with-port
(open-binary-input-file filename)
(lambda (port)
(let loop ((whole (make-bytevector 0)))
(let ((part (read-bytevector 4096 port)))
(if (eof-object? part)
whole
(loop (bytevector-append whole part))))))))
(define (main arguments)
(for-each (lambda (file) (tar-write-file (string-append "test/" file)
(slurp-binary-file file)))
(cdr arguments)))
(main (command-line))

View File

@ -0,0 +1,25 @@
#!/bin/sh
set -eu
cd "$(dirname "$0")"
echo "Entering directory '$PWD'"
payload="trivial-tar-writer.scm trivial-tar-writer-test.sh"
set -x
chibi-scheme -A . trivial-tar-writer-test.scm $payload \
>trivial-tar-writer-test-chibi.tar
gsi-script . trivial-tar-writer-test.scm $payload \
>trivial-tar-writer-test-gambit.tar
gosh -A . trivial-tar-writer-test.scm $payload \
>trivial-tar-writer-test-gauche.tar
kawa -Dkawa.import.path="$PWD/*.sld" trivial-tar-writer-test.scm $payload \
>trivial-tar-writer-test-kawa.tar
bsdtar -cf trivial-tar-writer-test-bsd.tar $payload
gtar -cf trivial-tar-writer-test-gnu.tar $payload
hexdump -C trivial-tar-writer-test-chibi.tar
echo
echo
echo
hexdump -C trivial-tar-writer-test-gnu.tar
echo
echo
echo
hexdump -C trivial-tar-writer-test-bsd.tar