Index: packages/which/test/candidate_paths_test.dart |
diff --git a/packages/which/test/candidate_paths_test.dart b/packages/which/test/candidate_paths_test.dart |
new file mode 100755 |
index 0000000000000000000000000000000000000000..d1a4d8941c0a6e3277138332278f1cfa22a9af5a |
--- /dev/null |
+++ b/packages/which/test/candidate_paths_test.dart |
@@ -0,0 +1,26 @@ |
+ |
+library which.test.candidate_paths; |
+ |
+import 'package:unittest/unittest.dart'; |
+ |
+import 'util.dart'; |
+ |
+main() { |
+ group('getCandidatePaths', () { |
+ test('posix', () { |
+ var candidatePaths = getPosixCandidatePaths('z', '/x/y:/a/b/c', '/foo/bar'); |
+ expect(candidatePaths, ['/x/y/z', '/a/b/c/z']); |
+ }); |
+ |
+ test('windows', () { |
+ var candidatePaths = getWindowsCandidatePaths('z', r'C:\x\y;C:\a\b\c', '.EXE;.BAT', r'C:\foo\bar'); |
+ expect(candidatePaths, [ |
+ r'C:\foo\bar\z.EXE', |
+ r'C:\foo\bar\z.BAT', |
+ r'C:\x\y\z.EXE', |
+ r'C:\x\y\z.BAT', |
+ r'C:\a\b\c\z.EXE', |
+ r'C:\a\b\c\z.BAT']); |
+ }); |
+ }); |
+} |