mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-16 15:53:03 +00:00
tests: use a portable 'truncate' implementation
Suggested by Paul Eggert. https://lists.gnu.org/archive/html/bison-patches/2019-10/msg00044.html * tests/local.at (AT_DATA_NO_FINAL_EOL): Use dd instead of perl.
This commit is contained in:
@@ -57,7 +57,11 @@ m4_define([AT_SETUP_STRIP],
|
|||||||
m4_define([AT_DATA_NO_FINAL_EOL],
|
m4_define([AT_DATA_NO_FINAL_EOL],
|
||||||
[AT_DATA([$1], [$2
|
[AT_DATA([$1], [$2
|
||||||
])
|
])
|
||||||
AT_PERL_REQUIRE([[-pi -e 'chomp if eof' $1]])
|
AT_REQUIRE([
|
||||||
|
set x $(LC_ALL=C ls -l '$1') &&
|
||||||
|
size=$][6 &&
|
||||||
|
{ test $size -eq 0 || dd obs=1 seek=`expr $size - 1` if=/dev/null of='$1'; }],
|
||||||
|
[], [ignore], [ignore])
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user