summaryrefslogtreecommitdiffstats
path: root/src/choice.rs
diff options
context:
space:
mode:
authorRyan Geary <rtgnj42@gmail.com>2020-06-17 19:06:28 -0400
committerRyan Geary <rtgnj42@gmail.com>2020-06-17 19:24:05 -0400
commit767b9303f218ae1c15f5dfbcc7b62c72983e5efb (patch)
tree8e0cbc9cac9898c35d97662b48fde9de24c81471 /src/choice.rs
parent0e422090d33da2f320a77fd128554635ba7aacba (diff)
Add backslash escape parsing (#26)
Diffstat (limited to 'src/choice.rs')
-rw-r--r--src/choice.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/choice.rs b/src/choice.rs
index 5e6e679..d7447fe 100644
--- a/src/choice.rs
+++ b/src/choice.rs
@@ -1115,6 +1115,15 @@ mod tests {
fn print_neg_4_to_2_one_indexed() {
test_fn(vec!["choose", "-4:2", "--one-indexed"], "a b c d", "a b");
}
+
+ #[test]
+ fn print_2_to_4_newline_ofs() {
+ test_fn(
+ vec!["choose", "2:4", "-o", r#"\n"#],
+ "a b c d e f",
+ "c\nd\ne",
+ );
+ }
}
mod is_reverse_range_tests {