mirror of
https://github.com/textmate/textmate.git
synced 2026-01-21 04:38:13 -05:00
Add glob test: ‘*.ext’ doesn’t match ‘.ext’
I wasn’t sure if this was really desired, but it mimics bash.
This commit is contained in:
@@ -60,6 +60,13 @@ public:
|
||||
TS_ASSERT( path::glob_t("{,.}*").does_match("test"));
|
||||
TS_ASSERT( path::glob_t("{,.}*").does_match(".htaccess"));
|
||||
|
||||
TS_ASSERT( path::glob_t("*file").does_match("file"));
|
||||
TS_ASSERT( path::glob_t("fi*le").does_match("file"));
|
||||
TS_ASSERT( path::glob_t("file*").does_match("file"));
|
||||
TS_ASSERT(!path::glob_t("*.ext").does_match(".ext"));
|
||||
TS_ASSERT( path::glob_t(".*ext").does_match(".ext"));
|
||||
TS_ASSERT( path::glob_t(".ext*").does_match(".ext"));
|
||||
|
||||
TS_ASSERT( path::glob_t("*" ).does_match("foo.txt"));
|
||||
TS_ASSERT( path::glob_t("foo*" ).does_match("foo.txt"));
|
||||
TS_ASSERT( path::glob_t("foo/*" ).does_match("foo/bar.txt"));
|
||||
|
||||
Reference in New Issue
Block a user