summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAndrew Gallant <jamslam@gmail.com>2017-01-11 18:53:35 -0500
committerAndrew Gallant <jamslam@gmail.com>2017-01-11 18:53:35 -0500
commit7a951f103a2abeba5af53905e168a09179704b48 (patch)
tree83cee8bdfd1ce27760db0def305197f2044e67df /tests
parentc3de1f58ea45fec442da21e9e1174e4269f64998 (diff)
Make --column imply --line-number.
Closes #243
Diffstat (limited to 'tests')
-rw-r--r--tests/tests.rs15
1 files changed, 12 insertions, 3 deletions
diff --git a/tests/tests.rs b/tests/tests.rs
index 92d8e8ca..858fc623 100644
--- a/tests/tests.rs
+++ b/tests/tests.rs
@@ -107,8 +107,8 @@ sherlock!(columns, |wd: WorkDir, mut cmd: Command| {
cmd.arg("--column");
let lines: String = wd.stdout(&mut cmd);
let expected = "\
-57:For the Doctor Watsons of this world, as opposed to the Sherlock
-49:be, to a very large extent, the result of luck. Sherlock Holmes
+1:57:For the Doctor Watsons of this world, as opposed to the Sherlock
+3:49:be, to a very large extent, the result of luck. Sherlock Holmes
";
assert_eq!(lines, expected);
});
@@ -781,7 +781,7 @@ clean!(regression_105_part2, "test", ".", |wd: WorkDir, mut cmd: Command| {
cmd.arg("--column");
let lines: String = wd.stdout(&mut cmd);
- assert_eq!(lines, "foo:3:zztest\n");
+ assert_eq!(lines, "foo:1:3:zztest\n");
});
// See: https://github.com/BurntSushi/ripgrep/issues/127
@@ -1214,6 +1214,15 @@ clean!(feature_159_zero_max, "test", ".", |wd: WorkDir, mut cmd: Command| {
wd.assert_err(&mut cmd);
});
+// See: https://github.com/BurntSushi/ripgrep/issues/243
+clean!(feature_243_column_line, "test", ".", |wd: WorkDir, mut cmd: Command| {
+ wd.create("foo", "test");
+ cmd.arg("--column");
+
+ let lines: String = wd.stdout(&mut cmd);
+ assert_eq!(lines, "foo:1:1:test\n");
+});
+
// See: https://github.com/BurntSushi/ripgrep/issues/263
clean!(feature_263_sort_files, "test", ".", |wd: WorkDir, mut cmd: Command| {
wd.create("foo", "test");