Mercurial > hg > octave-nkf > gnulib-hg
view tests/test-fflush2.sh @ 17300:b037043ced60
bootstrap: remove the need for a sorted .gitignore
During bootstrap, files may be created which are already included
in .gitignore, but the test to add such a file relied on the
sort order. Now, it just adds such a new entry and thus only
changes the file if the line count would change.
* bootstrap (insert_if_absent): Instead of comparing the
sorted new file with the original, the function compares the line
count, and only in case of a difference, the given file is changed.
Also ensure that the given ignore file does not already include
duplicate entries, as otherwise, the entry count would be innacurate.
(sort_patterns): Remove this now redundant function.
(gitignore_entries): A new function to return significant entries
from .gitignore.
Improved-by: Pádraig Brady
author | Bernhard Voelker <mail@bernhard-voelker.de> |
---|---|
date | Sun, 20 Jan 2013 18:06:54 +0000 |
parents | 1b3e52ed017e |
children |
line wrap: on
line source
#!/bin/sh # Execute the test only with seekable input stream. # The behaviour of fflush() on a non-seekable input stream is undefined. ./test-fflush2${EXEEXT} 1 < "$srcdir/test-fflush2.sh" || exit $? ./test-fflush2${EXEEXT} 2 < "$srcdir/test-fflush2.sh" || exit $? #cat "$srcdir/test-fflush2.sh" | ./test-fflush2${EXEEXT} || exit $? exit 0