Skip to content

Commit 947c104

Browse files
committed
tests: restore some !MINGW prereqs
Even when built with the import-url feature, the "file://" schemed urls used in the tests don't work on Windows due to the slashy, drive-letter-less path not being portable to Windows.
1 parent 0ff60e2 commit 947c104

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

t/t1800-import.sh

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ test_expect_success 'Apply a patch and edit message' '
163163
stg delete ..
164164
'
165165

166-
test_expect_success STG_IMPORT_URL 'Apply a patch from a URL' '
166+
test_expect_success !MINGW,STG_IMPORT_URL 'Apply a patch from a URL' '
167167
stg import -u "file://$TEST_DIRECTORY/t1800/git-diff" &&
168168
[ $(git cat-file -p $(stg id) \
169169
| grep -c "tree e96b1fba2160890ff600b675d7140d46b022b155") = 1 ] &&
@@ -255,21 +255,23 @@ test_expect_success 'Apply a series from a tarball' '
255255
stg delete ..
256256
'
257257

258-
test_expect_success STG_IMPORT_URL 'Apply a series from a tarball url' '
258+
test_expect_success !MINGW,STG_IMPORT_URL 'Apply a series from a tarball url' '
259259
stg import --url --series "file://$(pwd)/jabberwocky.tar.bz2" &&
260260
[ $(git cat-file -p $(stg id) \
261-
| grep -c "tree 2c33937252a21f1550c0bf21f1de534b68f69635") = 1 ]
261+
| grep -c "tree 2c33937252a21f1550c0bf21f1de534b68f69635") = 1 ] &&
262+
stg show | grep -e "Author: Clark Williams <[email protected]>" &&
263+
stg delete ..
262264
'
263265

264-
test_expect_success !STG_IMPORT_URL 'Apply a series from a abs tarball path' '
266+
test_expect_success 'Apply a series from a abs tarball path' '
265267
stg import --series "$(pwd)/jabberwocky.tar.bz2" &&
266268
[ $(git cat-file -p $(stg id) \
267-
| grep -c "tree 2c33937252a21f1550c0bf21f1de534b68f69635") = 1 ]
269+
| grep -c "tree 2c33937252a21f1550c0bf21f1de534b68f69635") = 1 ] &&
270+
stg show | grep -e "Author: Clark Williams <[email protected]>" &&
271+
stg delete --top --spill
268272
'
269273

270274
test_expect_success 'Import with author options' '
271-
stg show | grep -e "Author: Clark Williams <[email protected]>" &&
272-
stg delete --top --spill &&
273275
stg diff >some.patch &&
274276
git reset jabberwocky.txt &&
275277
git checkout jabberwocky.txt &&

t/t1801-import-email.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ test_expect_success 'Apply a patch from an 8bit-encoded e-mail' '
2121
stg delete ..
2222
'
2323

24-
test_expect_success STG_IMPORT_URL 'Apply a patch from an 8bit-encoded e-mail url' '
24+
test_expect_success !MINGW,STG_IMPORT_URL 'Apply a patch from an 8bit-encoded e-mail url' '
2525
stg import -u -m "file://$TEST_DIRECTORY"/t1801/email-8bit &&
2626
[ $(git cat-file -p $(stg id) \
2727
| grep -c "tree 030be42660323ff2a1958f9ee79589a4f3fbee2f") = 1 ] &&
@@ -118,7 +118,7 @@ test_expect_success 'Apply several patches from an mbox file' '
118118
stg delete ..
119119
'
120120

121-
test_expect_success STG_IMPORT_URL 'Apply several patches from an mbox url' '
121+
test_expect_success !MINGW,STG_IMPORT_URL 'Apply several patches from an mbox url' '
122122
test_config stgit.import.message-id "yes" &&
123123
stg import -u -M "file://$TEST_DIRECTORY"/t1801/email-mbox &&
124124
[ $(git cat-file -p $(stg id change-1) \

0 commit comments

Comments
 (0)