From 186d749e94905a3f98271513be48e6772c5112fd Mon Sep 17 00:00:00 2001 From: Andrew Liebenow Date: Thu, 24 Oct 2024 13:12:38 -0500 Subject: [PATCH] Replace commented-out code with TODO comments --- src/uu/tr/src/operation.rs | 15 ++------------- tests/by-util/test_tr.rs | 5 ++--- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/src/uu/tr/src/operation.rs b/src/uu/tr/src/operation.rs index 9bb5f9983..fc01a8360 100644 --- a/src/uu/tr/src/operation.rs +++ b/src/uu/tr/src/operation.rs @@ -324,19 +324,8 @@ impl Sequence { Ok(ue) => Some(ue), Err(_pa) => { // TODO - // Cannot log here, because this closure is executed multiple times - - // let mut last_char = str_to_parse.chars(); - - // let second_number = last_char.next_back().unwrap(); - - // let first_number = last_char.as_str(); - - // show!(USimpleError::new( - // 0, - // format!("warning: the ambiguous octal escape \\{str_to_parse} is being interpreted as the 2-byte sequence \\{first_number}, {second_number}") - // )); - + // A warning needs to be printed here + // See https://github.com/uutils/coreutils/issues/6821 None } } diff --git a/tests/by-util/test_tr.rs b/tests/by-util/test_tr.rs index ed529f407..ebd7635e4 100644 --- a/tests/by-util/test_tr.rs +++ b/tests/by-util/test_tr.rs @@ -1495,9 +1495,8 @@ fn test_multibyte_octal_sequence() { .pipe_in("(1Ł)") .succeeds() // TODO - // Cannot log warning because of how nom is parsing the arguments - // .stderr_is(r"tr: warning: the ambiguous octal escape \501 is being interpreted as the 2-byte sequence \50, 1 - // ") + // A warning needs to be printed here + // See https://github.com/uutils/coreutils/issues/6821 .stdout_is("Ł)"); }