mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
ptx: fixes
This commit is contained in:
parent
a64fce8286
commit
412d2b3b1f
3 changed files with 157 additions and 55 deletions
|
@ -2,6 +2,7 @@
|
|||
//
|
||||
// For the full copyright and license information, please view the LICENSE
|
||||
// file that was distributed with this source code.
|
||||
// spell-checker:ignore roff
|
||||
use crate::common::util::TestScenario;
|
||||
|
||||
#[test]
|
||||
|
@ -112,3 +113,50 @@ fn gnu_ext_disabled_empty_word_regexp_ignores_break_file() {
|
|||
.succeeds()
|
||||
.stdout_only_fixture("gnu_ext_disabled_rightward_no_ref.expected");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_reject_too_many_operands() {
|
||||
new_ucmd!().args(&["-G", "-", "-", "-"]).fails_with_code(1);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_break_file_regex_escaping() {
|
||||
new_ucmd!()
|
||||
.pipe_in("\\.+*?()|[]{}^$#&-~")
|
||||
.args(&["-G", "-b", "-", "input"])
|
||||
.succeeds()
|
||||
.stdout_only_fixture("break_file_regex_escaping.expected");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_ignore_case() {
|
||||
new_ucmd!()
|
||||
.args(&["-G", "-f"])
|
||||
.pipe_in("a _")
|
||||
.succeeds()
|
||||
.stdout_only(".xx \"\" \"\" \"a _\" \"\"\n.xx \"\" \"a\" \"_\" \"\"\n");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_format() {
|
||||
new_ucmd!()
|
||||
.args(&["-G", "-O"])
|
||||
.pipe_in("a")
|
||||
.succeeds()
|
||||
.stdout_only(".xx \"\" \"\" \"a\" \"\"\n");
|
||||
new_ucmd!()
|
||||
.args(&["-G", "-T"])
|
||||
.pipe_in("a")
|
||||
.succeeds()
|
||||
.stdout_only("\\xx {}{}{a}{}{}\n");
|
||||
new_ucmd!()
|
||||
.args(&["-G", "--format=roff"])
|
||||
.pipe_in("a")
|
||||
.succeeds()
|
||||
.stdout_only(".xx \"\" \"\" \"a\" \"\"\n");
|
||||
new_ucmd!()
|
||||
.args(&["-G", "--format=tex"])
|
||||
.pipe_in("a")
|
||||
.succeeds()
|
||||
.stdout_only("\\xx {}{}{a}{}{}\n");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue