mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 03:40:34 +02:00
Avoid non-portable tail' argument in
test-guile-snarf'.
* test-suite/standalone/test-guile-snarf (strip_first_line): New function. (snarf): Use it.
This commit is contained in:
parent
1acb290f66
commit
25dc93dd57
1 changed files with 17 additions and 1 deletions
|
@ -1,7 +1,23 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Test the `guile-snarf' tool.
|
||||||
|
|
||||||
|
# Strip the first line, like GNU `tail -n +2' does, but in a portable
|
||||||
|
# way (`tail' on Solaris 10 doesn't support `-n +2' for instance.)
|
||||||
|
strip_first_line ()
|
||||||
|
{
|
||||||
|
read line
|
||||||
|
while read line
|
||||||
|
do
|
||||||
|
echo "$line"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
snarf ()
|
snarf ()
|
||||||
{
|
{
|
||||||
echo "$1" | guile-snarf - | tail -n +2 | tr -d ' \t\n'
|
# GNU cpp emits a comment on the first line, which shows what
|
||||||
|
# arguments it was passed. Strip this line.
|
||||||
|
echo "$1" | guile-snarf - | strip_first_line | tr -d ' \t\n'
|
||||||
}
|
}
|
||||||
|
|
||||||
snarf_test ()
|
snarf_test ()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue