Skip to content

Commit

Permalink
tr: enable ignored tests that have already been fixed
Browse files Browse the repository at this point in the history
Specifically:
- check_against_gnu_tr_tests_e: Yes, the test is about octal interpretation.
- check_against_gnu_tr_tests_ross_0a: Yes, the [Y*] generates multiple Y's, which causes conflicting replacements, which is why the operation is rejected.
- check_against_gnu_tr_tests_ross_0b: Same, plus a newline character was accidentally forgotten.
- check_against_gnu_tr_tests_fowler_1: Apparently the problem was fixed at some point.
  • Loading branch information
BenWiederhake committed Sep 30, 2024
1 parent 1f0b519 commit 576374d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions tests/by-util/test_tr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,6 @@ fn check_against_gnu_tr_tests_d() {
}

#[test]
#[ignore = "I cannot tell if this means that tr preserve the octal representation?"]
fn check_against_gnu_tr_tests_e() {
// ['e', qw(-s '[\0-\5]'), {IN=>"\0\0a\1\1b\2\2\2c\3\3\3d\4\4\4\4e\5\5"}, {OUT=>"\0a\1b\2c\3d\4e\5"}],
new_ucmd!()
Expand Down Expand Up @@ -1042,7 +1041,6 @@ fn check_against_gnu_tr_tests_bs_at_end() {
}

#[test]
#[ignore = "not sure why GNU bails here. `[Y*]` should be able to generate all the mapping"]
fn check_against_gnu_tr_tests_ross_0a() {
// # From Ross
// ['ross-0a', qw(-cs '[:upper:]' 'X[Y*]'), {IN=>''}, {OUT=>''}, {EXIT=>1},
Expand All @@ -1055,15 +1053,14 @@ fn check_against_gnu_tr_tests_ross_0a() {
}

#[test]
#[ignore = "not sure why GNU bails here. `[Y*]` should be able to generate all the mapping"]
fn check_against_gnu_tr_tests_ross_0b() {
// ['ross-0b', qw(-cs '[:cntrl:]' 'X[Y*]'), {IN=>''}, {OUT=>''}, {EXIT=>1},
// {ERR=>$map_all_to_1}],
new_ucmd!()
.args(&["-cs", "[:cntrl:]", "X[Y*]"])
.pipe_in("")
.fails()
.stderr_is("tr: when translating with complemented character classes,\nstring2 must map all characters in the domain to one");
.stderr_is("tr: when translating with complemented character classes,\nstring2 must map all characters in the domain to one\n");
}

#[test]
Expand Down Expand Up @@ -1234,7 +1231,6 @@ fn check_against_gnu_tr_tests_repeat_x_c() {
}

#[test]
#[ignore = "I think either clap-rs or uutils is parsing the '-H' as an argument..."]
fn check_against_gnu_tr_tests_fowler_1() {
// # From Glenn Fowler.
// ['fowler-1', qw(ah -H), {IN=>'aha'}, {OUT=>'-H-'}],
Expand Down

0 comments on commit 576374d

Please sign in to comment.