forked from dorny/paths-filter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Export files matching rules (dorny#32)
* Export files matching rules * Improve debug output * Fix PR test workflow * Always quote output path + fix PR test * Use proper single quote escaping in workflow file * Improve error handling and docs for list-files input parameter
- Loading branch information
Showing
8 changed files
with
206 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import shellEscape from '../src/shell-escape' | ||
|
||
test('simple path escaped', () => { | ||
expect(shellEscape('file')).toBe("'file'") | ||
}) | ||
|
||
test('path with space is wrapped with single quotes', () => { | ||
expect(shellEscape('file with space')).toBe("'file with space'") | ||
}) | ||
|
||
test('path with quote is divided into quoted segments and escaped quote', () => { | ||
expect(shellEscape("file'with quote")).toBe("'file'\\''with quote'") | ||
}) | ||
test('path with leading quote does not have double quotes at beginning', () => { | ||
expect(shellEscape("'file-leading-quote")).toBe("\\''file-leading-quote'") | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.