summaryrefslogtreecommitdiffstats
path: root/src/choice.rs
diff options
context:
space:
mode:
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 {