aboutsummaryrefslogtreecommitdiffstats
path: root/src/parse/test.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/parse/test.rs')
-rw-r--r--src/parse/test.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/parse/test.rs b/src/parse/test.rs
index ca57e75..92124b0 100644
--- a/src/parse/test.rs
+++ b/src/parse/test.rs
@@ -94,3 +94,18 @@ fn variable_with_defaults() {
pipes([cmd([str([var_default(b"x", estr(b"y"))])])]),
);
}
+
+#[test]
+fn escape_newline() {
+ parse_test(parse(b"\"\\n\""), pipes([cmd([estr(b"\n")])]));
+}
+
+#[test]
+fn escape_carriage_return() {
+ parse_test(parse(b"\"\\r\""), pipes([cmd([estr(b"\r")])]));
+}
+
+#[test]
+fn escape_tab() {
+ parse_test(parse(b"\"\\t\""), pipes([cmd([estr(b"\t")])]));
+}