From 7c0c059c83f673d456cf4c566416878decba5061 Mon Sep 17 00:00:00 2001 From: Matthew Rothenberg Date: Wed, 4 Mar 2015 15:06:27 -0500 Subject: [PATCH] test for filename escaping on expand too --- features/command_expand.feature | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/features/command_expand.feature b/features/command_expand.feature index 5ec54ef..47d2df3 100644 --- a/features/command_expand.feature +++ b/features/command_expand.feature @@ -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 | | When I successfully run `scmpuff expand 1` - Then the output should match /so\\\(dumb\\\)\.jpg/ + Then the output should contain exactly "" + 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"