1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-05 11:40:20 +02:00
guile/test-suite/standalone/test-guile-snarf
BT Templeton fd029c35de guile-snarf: allow multiple init actions on one line
* libguile/guile-snarf.in (modern_snarf): Allow programs to specify
  multiple initialization actions on a single line. This makes it
  possible for C programs to define multiple subrs with a single macro
  invocation.

* test-suite/standalone/test-guile-snarf: Enable more tests.
2011-03-04 11:34:24 +01:00

20 lines
396 B
Bash
Executable file

#!/bin/sh
snarf ()
{
echo "$1" | guile-snarf - | tail -n +2 | tr -d ' \t\n'
}
snarf_test ()
{
x=`snarf "$1"`
if [ x"$x" != x"$2" ]; then
echo "Incorrect output: expected \"$2\", but got \"$x\""
exit 1
fi
}
snarf_test "^^a^:^" "a;"
snarf_test " ^ ^ b ^ : ^ " "b;"
snarf_test "c\n^^d^:^\ne" "d;"
snarf_test "f^^g^:^h" "g;"
snarf_test "^^i^:^j^^k^:^" "i;k;"