1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-09-16 03:36:18 +00:00

dircolors: escape "'" and ":"

This commit is contained in:
Daniel Hofstetter 2022-06-15 09:23:36 +02:00
parent 029e0dc613
commit 46b4b94c42
2 changed files with 46 additions and 0 deletions

View file

@ -141,6 +141,16 @@ fn test_stdin() {
.no_stderr();
}
#[test]
fn test_quoting() {
new_ucmd!()
.pipe_in("exec 'echo Hello;:'\n")
.args(&["-b", "-"])
.succeeds()
.stdout_is("LS_COLORS='ex='\\''echo Hello;\\:'\\'':';\nexport LS_COLORS\n")
.no_stderr();
}
#[test]
fn test_extra_operand() {
new_ucmd!()