[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [PATCH] head: add test case for negative -n invocation
From:       Denys Vlasenko <vda.linux () googlemail ! com>
Date:       2018-09-09 18:37:21
Message-ID: CAK1hOcNWfQCQq8FbmZdR4FU28sW9LxF0Gw8gPZjbUc36T6NQOw () mail ! gmail ! com
[Download RAW message or body]

Please post a "new-style" test, see e.g. testsuite/dc.tests for an example
On Thu, Sep 6, 2018 at 12:09 PM Thomas De Schampheleire
<patrickdepinguin@gmail.com> wrote:
>
> From: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
>
> 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 <thomas.de_schampheleire@nokia.com>
> ---
>  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
> busybox@busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic