diff --git a/tests/by-util/test_ptx.rs b/tests/by-util/test_ptx.rs index e990cac73..75c96e42e 100644 --- a/tests/by-util/test_ptx.rs +++ b/tests/by-util/test_ptx.rs @@ -87,3 +87,19 @@ fn gnu_ext_disabled_output_width_70() { .succeeds() .stdout_only_fixture("gnu_ext_disabled_output_width_70.expected"); } + +#[test] +fn gnu_ext_disabled_break_file() { + new_ucmd!() + .args(&["-G", "-b", "break_file", "input"]) + .succeeds() + .stdout_only_fixture("gnu_ext_disabled_break_file.expected"); +} + +#[test] +fn gnu_ext_disabled_empty_word_regexp_ignores_break_file() { + new_ucmd!() + .args(&["-G", "-b", "break_file", "-R", "-W", "", "input"]) + .succeeds() + .stdout_only_fixture("gnu_ext_disabled_rightward_no_ref.expected"); +} diff --git a/tests/fixtures/ptx/break_file b/tests/fixtures/ptx/break_file new file mode 100644 index 000000000..4c992d40a --- /dev/null +++ b/tests/fixtures/ptx/break_file @@ -0,0 +1 @@ +abc_e diff --git a/tests/fixtures/ptx/gnu_ext_disabled_break_file.expected b/tests/fixtures/ptx/gnu_ext_disabled_break_file.expected new file mode 100644 index 000000000..7afce1861 --- /dev/null +++ b/tests/fixtures/ptx/gnu_ext_disabled_break_file.expected @@ -0,0 +1,41 @@ +.xx "" "" """quotes"", for roff" "" +.xx "" "and some other like %a, b" "#, c$c" "" +.xx "" "and some other like %a, b#, c" "$c" "" +.xx "" "and some other like" "%a, b#, c$c" "" +.xx "" "and some other like %a" ", b#, c$c" "" +.xx "" """quotes""," "for roff" "" +.xx "" "{brackets}" "for tex" "" +.xx "" "" "hello world!" "" +.xx "" "let's c" "heck special characters:" "" +.xx "" "let's check special c" "haracters:" "" +.xx "" "let's check spec" "ial characters:" "" +.xx "" "let's chec" "k special characters:" "" +.xx "" "{brac" "kets} for tex" "" +.xx "" "oh, and bac" "k\slash" "" +.xx "" "" "let's check special characters:" "" +.xx "" "let's check specia" "l characters:" "" +.xx "" "and some other" "like %a, b#, c$c" "" +.xx "" "he" "llo world!" "" +.xx "" "maybe a" "lso~or^" "" +.xx "" "" "maybe also~or^" "" +.xx "" "a" "nd some other like %a, b#, c$c" "" +.xx "" "oh, a" "nd back\slash" "" +.xx "" "" "oh, and back\slash" "" +.xx "" "and some" "other like %a, b#, c$c" "" +.xx "" "let's check special cha" "racters:" "" +.xx "" "{b" "rackets} for tex" "" +.xx "" "and some othe" "r like %a, b#, c$c" "" +.xx "" """quotes"", for" "roff" "" +.xx "" "let's check special characte" "rs:" "" +.xx "" """quote" "s"", for roff" "" +.xx "" "oh, and back\sla" "sh" "" +.xx "" "and" "some other like %a, b#, c$c" "" +.xx "" "let's check" "special characters:" "" +.xx "" "let's check special charac" "ters:" "" +.xx "" "{brackets} for" "tex" "" +.xx "" "le" "t's check special characters:" "" +.xx "" "{bracke" "ts} for tex" "" +.xx "" "hello" "world!" "" +.xx "" "{brackets} for te" "x" "" +.xx "" "ma" "ybe also~or^" "" +.xx "" "" "{brackets} for tex" ""