summaryrefslogtreecommitdiff
path: root/predict_test.go
diff options
context:
space:
mode:
authorEyal Posener <[email protected]>2017-05-11 22:23:41 +0300
committerGitHub <[email protected]>2017-05-11 22:23:41 +0300
commitbd51afb7f204fb907fb9a16fec4491028e50c8c7 (patch)
tree9c731042ef4f7e6d9fba2ae1225c36fe398e768f /predict_test.go
parentd3bbb859d52b45987e3cd2098e28423f32edd999 (diff)
parent026906bf106ac1c18117443a26e6efa196bd9dae (diff)
Merge pull request #13 from posener/improves
Improves
Diffstat (limited to 'predict_test.go')
-rw-r--r--predict_test.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/predict_test.go b/predict_test.go
index 6b77fbe..ebe8aa1 100644
--- a/predict_test.go
+++ b/predict_test.go
@@ -60,30 +60,30 @@ func TestPredicate(t *testing.T) {
{
name: "files/txt",
p: PredictFiles("*.txt"),
- want: []string{"./a.txt", "./b.txt", "./c.txt", "./.dot.txt"},
+ want: []string{"./", "./dir/", "./a.txt", "./b.txt", "./c.txt", "./.dot.txt"},
},
{
name: "files/txt",
p: PredictFiles("*.txt"),
arg: "./dir/",
- want: []string{},
+ want: []string{"./dir/"},
},
{
name: "files/x",
p: PredictFiles("x"),
arg: "./dir/",
- want: []string{"./dir/x"},
+ want: []string{"./dir/", "./dir/x"},
},
{
name: "files/*",
p: PredictFiles("x*"),
arg: "./dir/",
- want: []string{"./dir/x"},
+ want: []string{"./dir/", "./dir/x"},
},
{
name: "files/md",
p: PredictFiles("*.md"),
- want: []string{"./readme.md"},
+ want: []string{"./", "./dir/", "./readme.md"},
},
{
name: "dirs",
@@ -93,7 +93,7 @@ func TestPredicate(t *testing.T) {
},
{
name: "dirs and files",
- p: PredictFilesOrDirs("*"),
+ p: PredictFiles("*"),
arg: "./dir",
want: []string{"./dir/", "./dir/x"},
},
@@ -106,7 +106,7 @@ func TestPredicate(t *testing.T) {
name: "subdir",
p: PredictFiles("*"),
arg: "./dir/",
- want: []string{"./dir/x"},
+ want: []string{"./dir/", "./dir/x"},
},
}