summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorIan Kerins <ianskerins@gmail.com>2017-01-01 19:32:46 -0500
committerAndrew Gallant <jamslam@gmail.com>2017-01-07 18:14:24 -0500
commited01e80a796b7f5cbc83c63517d884d85f1cebd7 (patch)
tree0b5cb1e71f6ce96f914357bdb617719541d94078 /tests
parent8f7b9be356c005435f5612904f38ed5d95cc2aa0 (diff)
Provide a mechanism to compose type definitions
This extends the syntax of the --type-add flag to allow including the globs of other already defined types. Fixes #83.
Diffstat (limited to 'tests')
-rw-r--r--tests/tests.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/tests.rs b/tests/tests.rs
index 1802e186..fa024060 100644
--- a/tests/tests.rs
+++ b/tests/tests.rs
@@ -308,6 +308,17 @@ sherlock!(file_type_add, "Sherlock", ".", |wd: WorkDir, mut cmd: Command| {
assert_eq!(lines, "file.wat:Sherlock\n");
});
+sherlock!(file_type_add_compose, "Sherlock", ".", |wd: WorkDir, mut cmd: Command| {
+ wd.create("file.py", "Sherlock");
+ wd.create("file.rs", "Sherlock");
+ wd.create("file.wat", "Sherlock");
+ cmd.arg("--type-add").arg("wat:*.wat");
+ cmd.arg("--type-add").arg("combo:include:wat,py").arg("-t").arg("combo");
+ let lines: String = wd.stdout(&mut cmd);
+ println!("{}", lines);
+ assert_eq!(lines, "file.py:Sherlock\nfile.wat:Sherlock\n");
+});
+
sherlock!(glob, "Sherlock", ".", |wd: WorkDir, mut cmd: Command| {
wd.create("file.py", "Sherlock");
wd.create("file.rs", "Sherlock");