From: Thomas De Schampheleire <[email protected]>

Commit 2da9724b56169f00bd7fb6b9a11c9409a7620981 broke 'head -n -1' and was
later reverted with 0d598ab9f03dbf320f7b81c05e4a94cb303dfbc7.

This commit adds a test case to avoid future breakage.

Signed-off-by: Thomas De Schampheleire <[email protected]>
---
 testsuite/head/head-n-negative-works | 4 ++++
 1 file changed, 4 insertions(+)
 create mode 100644 testsuite/head/head-n-negative-works

diff --git a/testsuite/head/head-n-negative-works 
b/testsuite/head/head-n-negative-works
new file mode 100644
index 000000000..8c60f0df0
--- /dev/null
+++ b/testsuite/head/head-n-negative-works
@@ -0,0 +1,4 @@
+[ -n "$d" ] || d=..
+head -n -2 "$d/README" > logfile.gnu
+busybox head -n -2 "$d/README" > logfile.bb
+cmp logfile.gnu logfile.bb
-- 
2.16.4

_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to