---
 t/t4200-import-s.sh | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 62 insertions(+), 1 deletion(-)

diff --git a/t/t4200-import-s.sh b/t/t4200-import-s.sh
index 98a0e0e..3d668f3 100755
--- a/t/t4200-import-s.sh
+++ b/t/t4200-import-s.sh
@@ -6,8 +6,16 @@ test_description='Test the import -s command'
 
 . ./test-lib.sh
 
-prepare_test_env () {
+quilt --version 2> /dev/null
+
+if [ "$?" = "127" ]
+then
+  echo "Cannot execute quilt, skipping this test..."
+  test_done
+  exit 0
+fi
 
+prepare_test_env () {
     # Initialize git tree
     mkdir s
     echo 0 > t
@@ -248,4 +256,57 @@ test_expect_code \
      cleanup_test
     '
 
+test_filename_with_spaces () {
+    echo 1 > 'filename with space.txt'
+
+    git add 'filename with space.txt'
+    git commit -m initial
+
+    quilt new patch-test-space-fn.diff
+    quilt add 'filename with space.txt'
+
+    echo 2 > 'filename with space.txt'
+
+    quilt refresh
+    quilt pop -a
+
+    stg import -s patches/series
+    stg series
+}
+
+test_subdir_patches () {
+    echo 1 > 'filename.txt'
+
+    git add 'filename.txt'
+    git commit -m initial
+
+    quilt new d1/patch-test-subdir-patches.diff
+    quilt add 'filename.txt'
+
+    echo 2 > 'filename.txt'
+
+    quilt refresh
+
+    quilt new d2/patch-test-subdir-patches.diff
+    quilt add 'filename.txt'
+
+    echo 3 > 'filename.txt'
+
+    quilt refresh
+    quilt pop -a
+
+    stg import -s patches/series
+    stg series
+}
+
+test_expect_success 'Quilt import filename with spaces' \
+    'test_filename_with_spaces && \
+     stg delete ..
+    '
+
+test_expect_success 'Quilt import series with subdirs' \
+    'test_subdir_patches && \
+     stg delete ..
+    '
+
 test_done
-- 
2.1.4


_______________________________________________
stgit-users mailing list
[email protected]
https://mail.gna.org/listinfo/stgit-users

Reply via email to