Skip to content

Commit

Permalink
test for filename escaping on expand too
Browse files Browse the repository at this point in the history
  • Loading branch information
mroth committed Mar 4, 2015
1 parent a4f2282 commit 7c0c059
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions features/command_expand.feature
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,17 @@ Feature: command expansion at command line
When I successfully run `scmpuff expand -- git xxx "foo bar" 1`
Then the output should match /git\txxx\tfoo\\ bar\ta.txt/

Scenario: Verify filenames with stupid characters are properly escaped
Scenario Outline: Verify filenames with stupid characters are properly escaped
Given I override the environment variables to:
| variable | value |
| e1 | so(dumb).jpg |
| variable | value |
| e1 | <filename> |
When I successfully run `scmpuff expand 1`
Then the output should match /so\\\(dumb\\\)\.jpg/
Then the output should contain exactly "<escaped>"
Examples:
| filename | escaped |
| so(dumb).jpg | so\(dumb\).jpg |
| hi mom.txt | hi\ mom.txt |
| "x.txt | \"x.txt |

Scenario: Allow user to specify --relative paths
Given a directory named "foo"
Expand Down

0 comments on commit 7c0c059

Please sign in to comment.