diff options
author | Peter S Panov <peter@sipan.org> | 2017-06-29 00:57:33 +0000 |
---|---|---|
committer | Andrew Gallant <jamslam@gmail.com> | 2017-07-03 06:52:52 -0400 |
commit | 4047d9db710026b7f003243032f52d7c99c41ded (patch) | |
tree | 31a683ad965249ea5eabfe9052a6aa25d9a2badb /tests | |
parent | 4683a325fae596db75176d188034c6623e91db79 (diff) |
add --iglob flag
Working with Chris Stadler, implemented
https://github.com/BurntSushi/ripgrep/issues/163#issuecomment-300012592
Diffstat (limited to 'tests')
-rw-r--r-- | tests/tests.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/tests.rs b/tests/tests.rs index 95fecfd4..8e0c9e0b 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -336,6 +336,21 @@ sherlock!(glob_negate, "Sherlock", ".", |wd: WorkDir, mut cmd: Command| { assert_eq!(lines, "file.py:Sherlock\n"); }); +sherlock!(iglob, "Sherlock", ".", |wd: WorkDir, mut cmd: Command| { + wd.create("file.HTML", "Sherlock"); + cmd.arg("--iglob").arg("*.html"); + let lines: String = wd.stdout(&mut cmd); + assert_eq!(lines, "file.HTML:Sherlock\n"); +}); + +sherlock!(csglob, "Sherlock", ".", |wd: WorkDir, mut cmd: Command| { + wd.create("file1.HTML", "Sherlock"); + wd.create("file2.html", "Sherlock"); + cmd.arg("--glob").arg("*.html"); + let lines: String = wd.stdout(&mut cmd); + assert_eq!(lines, "file2.html:Sherlock\n"); +}); + sherlock!(count, "Sherlock", ".", |wd: WorkDir, mut cmd: Command| { cmd.arg("--count"); let lines: String = wd.stdout(&mut cmd); |