From b19b1751b5fba348bc9ab7a7efa0dad57acbb903 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Fri, 14 Jan 2022 07:06:08 +0000 Subject: [PATCH] Add test for option --ignore-extras --- test.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/test.sh b/test.sh index 8f8b547..4e647d5 100755 --- a/test.sh +++ b/test.sh @@ -65,6 +65,25 @@ EOF ./skip --foo > test.out 2>&1 || ## error is expected diff --brief test.expect test.out +echo "> skip lines until 3 tokens seen - ignored extra tokens on same line" +cat< test.in +Lorem ipsum dolor sit amet, +consectetur adipiscing elit, +sed do eiusmod tempor incididunt +ut labore et dolore magna aliqua. +Ut enim ad minim veniam, +quis nostrud exercitation ullamco +laboris nisi ut aliquip ex ea +commodo consequat. +EOF +cat< test.expect +quis nostrud exercitation ullamco +laboris nisi ut aliquip ex ea +commodo consequat. +EOF +./skip 3 test.in --token m --ignore-extras > test.out +diff --brief test.expect test.out + rm test.in test.out test.expect echo done