diff --git a/tests/pexpects/commandline.py b/tests/pexpects/commandline.py index 571cec309..0d0130080 100644 --- a/tests/pexpects/commandline.py +++ b/tests/pexpects/commandline.py @@ -42,7 +42,7 @@ sendline( "function handle_tilde; echo; echo '@GUARD:1@'; commandline -b; echo '@/GUARD:1@'; commandline -b ''; end" ) expect_prompt() -sendline("echo \en one \"two three\" four'five six'{7} 'eight~") +sendline("echo \\en one \"two three\" four'five six'{7} 'eight~") expect_prompt("\r\n@GUARD:1@\r\n(.*)\r\n@/GUARD:1@\r\n") # printing the buffer with -o should remove quoting diff --git a/tests/pexpects/complete-group-order.py b/tests/pexpects/complete-group-order.py index 82ea76b89..ff31ce6c4 100644 --- a/tests/pexpects/complete-group-order.py +++ b/tests/pexpects/complete-group-order.py @@ -43,6 +43,6 @@ expect_prompt() send("fooc \t") expect_re( - "india\W+hotel\W+charlie\W+alpha\W+delta\W+kilo\r\n" - + "foxtrot\W+golf\W+echo\W+bravo\W+juliett\W+lima" + "india\\W+hotel\\W+charlie\\W+alpha\\W+delta\\W+kilo\r\n" + + "foxtrot\\W+golf\\W+echo\\W+bravo\\W+juliett\\W+lima" ) diff --git a/tests/pexpects/eval-stack-overflow.py b/tests/pexpects/eval-stack-overflow.py index 8e47ce789..60f923135 100644 --- a/tests/pexpects/eval-stack-overflow.py +++ b/tests/pexpects/eval-stack-overflow.py @@ -31,7 +31,7 @@ expect_re( + "\r\nin command substitution" + "\r\nfish: Unable to evaluate string substitution" + re.escape("\r\neval (string replace dog tiger -- $history[1])") - + "\r\n *\^~+\^\w*" + + "\r\n *\\^~+\\^\\w*" ) expect_prompt() diff --git a/tests/pexpects/history.py b/tests/pexpects/history.py index d8612cfb8..b25f0f1e6 100644 --- a/tests/pexpects/history.py +++ b/tests/pexpects/history.py @@ -108,13 +108,13 @@ expect_prompt("count hello 0\r\n") # sent above that matches). sendline("history delete -p 'echo hello'") expect_re("history delete -p 'echo hello'" + TO_END_SUFFIX) -expect_re("\[1\] echo hello AGAIN" + TO_END_SUFFIX) -expect_re("\[2\] echo hello again" + TO_END_SUFFIX) +expect_re("\\[1\\] echo hello AGAIN" + TO_END_SUFFIX) +expect_re("\\[2\\] echo hello again" + TO_END_SUFFIX) expect_re("Enter nothing to cancel the delete, or\r\n") expect_re("Enter one or more of the entry IDs or ranges like '5..12', separated by a space.\r\n") expect_re("For example '7 10..15 35 788..812'.\r\n") expect_re("Enter 'all' to delete all the matching entries.\r\n") -expect_re("Delete which entries\? ") +expect_re("Delete which entries\\? ") sendline("1") expect_prompt('Deleting history entry 1: "echo hello AGAIN"\r\n') @@ -131,7 +131,7 @@ sendline( expect_prompt("count again 1\r\n") # Verify that the $history var has the expected content. -sendline("echo history2=$history\[2\]") +sendline("echo history2=$history[2]") expect_prompt("history2=echo count AGAIN .*\r\n") # Verify that history search is case-insensitive by default