diff --git a/sample_files/hidden-after/.hidden.txt b/sample_files/hidden-after/.hidden.txt new file mode 100644 index 0000000000..5c80f32d79 --- /dev/null +++ b/sample_files/hidden-after/.hidden.txt @@ -0,0 +1 @@ +after \ No newline at end of file diff --git a/sample_files/hidden-after/.hidden/doc.txt b/sample_files/hidden-after/.hidden/doc.txt new file mode 100644 index 0000000000..5c80f32d79 --- /dev/null +++ b/sample_files/hidden-after/.hidden/doc.txt @@ -0,0 +1 @@ +after \ No newline at end of file diff --git a/sample_files/hidden-before/.hidden.txt b/sample_files/hidden-before/.hidden.txt new file mode 100644 index 0000000000..ee2363a4df --- /dev/null +++ b/sample_files/hidden-before/.hidden.txt @@ -0,0 +1 @@ +before \ No newline at end of file diff --git a/sample_files/hidden-before/.hidden/doc.txt b/sample_files/hidden-before/.hidden/doc.txt new file mode 100644 index 0000000000..ee2363a4df --- /dev/null +++ b/sample_files/hidden-before/.hidden/doc.txt @@ -0,0 +1 @@ +before \ No newline at end of file diff --git a/tests/cli.rs b/tests/cli.rs index 467b5b64ab..b7c1db4dfd 100644 --- a/tests/cli.rs +++ b/tests/cli.rs @@ -246,3 +246,16 @@ fn dump_syntax() { .arg("sample_files/simple_after.js"); cmd.assert().success(); } + +#[test] +fn walk_hidden_items() { + let mut cmd = get_base_command(); + + cmd.args(["sample_files/hidden-before", "sample_files/hidden-after"]); + + let predicate_fn = predicate::str::contains(".hidden/doc.txt") + .and(predicate::str::contains(".hidden.txt")) + .and(predicate::str::contains("before")) + .and(predicate::str::contains("after")); + cmd.assert().stdout(predicate_fn); +}