Skip to content

Commit 17dcd1e

Browse files
committed
gnu-tests: adapt expected behavior of tac-continue
Add a patch that changes the expected behavior in tac-continue test to match uutils implementation of tac. The test expects that a temporary file has to be opened and written to. This is not the case for uutils implementation.
1 parent 132b13a commit 17dcd1e

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

util/gnu-patches/series

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ tests_sort_merge.pl.patch
1010
tests_tsort.patch
1111
tests_du_move_dir_while_traversing.patch
1212
test_mkdir_restorecon.patch
13+
tests_tac_continue.patch
1314
error_msg_uniq.diff
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
Index: gnu/tests/tac/tac-continue.sh
2+
===================================================================
3+
--- gnu.orig/tests/tac/tac-continue.sh
4+
+++ gnu/tests/tac/tac-continue.sh
5+
@@ -59,11 +59,17 @@ seq 5 > in
6+
7+
# Give tac a fifo command line argument.
8+
# This makes it try to create a temporary file in $TMPDIR.
9+
+
10+
+# uutils does not create this temporary file in $TMPDIR, so the expected result is different
11+
+# there is just no difference from normal operation
12+
+# that means tac returns with success and the expected output the reverse of inputs
13+
+
14+
mkfifo_or_skip_ fifo
15+
seq 1000 > fifo & pid=$!
16+
-TMPDIR=$FULL_PARTITION_TMPDIR tac fifo in >out 2>err && fail=1
17+
+TMPDIR=$FULL_PARTITION_TMPDIR tac fifo in >out 2>err || fail=1
18+
19+
-cat <<\EOF > exp || framework_failure_
20+
+seq 1000 -1 1 > exp || framework_failure_
21+
+cat <<\EOF >> exp || framework_failure_
22+
5
23+
4
24+
3

0 commit comments

Comments
 (0)