From 189ff4f8b3a87cc4503ffe5f346b262415dc3b59 Mon Sep 17 00:00:00 2001 From: Kael Zhang Date: Mon, 19 Dec 2022 21:40:23 +0800 Subject: [PATCH] #81: fixes windows test cases --- test/fixtures/cases.js | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/test/fixtures/cases.js b/test/fixtures/cases.js index 3db6d14..d94aaf1 100644 --- a/test/fixtures/cases.js +++ b/test/fixtures/cases.js @@ -22,22 +22,6 @@ const cases = [ // } // ], ///////////////////////////////////////////////////////////////////// - [ - '#81: invalid trailing backslash at the end should not throw', - [ - 'test\\', - 'testa\\\\', - 'foo/*', - // test negative pattern - '!foo/test\\' - ], - { - 'test': 0, - 'test\\': 0, - 'testa\\': 1, - 'foo/test\\': 1 - } - ], [ '#76 (invalid), comments with no heading whitespace', [ @@ -928,12 +912,21 @@ const IS_WINDOWS = process.platform === 'win32' if (!IS_WINDOWS && !process.env.IGNORE_TEST_WIN32) { cases.push( [ - '#81: invalid trailing backslash, test non-windows only', + '#81: invalid trailing backslash at the end should not throw, test non-windows env only', [ - '\\' + 'test\\', + 'testa\\\\', + '\\', + 'foo/*', + // test negative pattern + '!foo/test\\' ], { - '\\': 0 + 'test': 0, + 'test\\': 0, + 'testa\\': 1, + '\\': 0, + 'foo/test\\': 1 } ], [