| Check to see that FilteredItemSelectionDialog uses proper regex to filter results. |
| |
| |
| Empty query matches everything |
| Query:"" |
| Input:["a","bc"] |
| Output:["a","bc"] |
| |
| Case sensitive matching |
| Query:"aB" |
| Input:["abc","acB"] |
| Output:["acB","abc"] |
| |
| Case insensitive matching |
| Query:"ab" |
| Input:["abc","bac","a_B"] |
| Output:["a_B","abc"] |
| |
| Duplicate symbols in query |
| Query:"aab" |
| Input:["abab","abaa","caab","baac","fooaab"] |
| Output:["abab","caab","fooaab"] |
| |
| Dangerous input escaping |
| Query:"^[]{}()\\.$*+?|" |
| Input:["^[]{}()\\.$*+?|","0123456789abcdef"] |
| Output:["^[]{}()\\.$*+?|"] |
| |
| Camel case matching |
| Query:"fBaB" |
| Input:["fooBarBaz","FooBarBaz","Foo_Bar_Baz","foo_bar_baz","foobarbaz","foobarBaz","afooBarBaz","aFooBarBaz","a fooBarBaz","fooBorBaz","fooBorCaz"] |
| Output:["fooBarBaz","FooBarBaz","Foo_Bar_Baz","a fooBarBaz","aFooBarBaz","afooBarBaz","foo_bar_baz","foobarBaz","foobarbaz"] |
| |
| Underscore matching |
| Query:"fO_ba_b" |
| Input:["foOBarBaz","FoOBarBaz","FoO_Bar_Baz","foO_bar_baz","foObarbaz","foObarBaz","afoOBarBaz","aFoOBarBaz","a foOBarBaz","foOBorBaz","foOBorCaz"] |
| Output:["foO_bar_baz","FoO_Bar_Baz"] |
| |
| Case insensitive matching |
| Query:"fb" |
| Input:["foo_bar","FB","foobar","fBar"] |
| Output:["FB","foo_bar","fBar","foobar"] |
| |
| Case insensitive underscore matching |
| Query:"f_b" |
| Input:["foo_bar","FOO_BAR","Foo_Bar","fOo_bAr"] |
| Output:["Foo_Bar","fOo_bAr","foo_bar","FOO_BAR"] |
| |