Skip to content

Commit 0ff60e2

Browse files
committed
tests: lazy prereq test for stg import --url
1 parent 2e85e23 commit 0ff60e2

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

t/t1800-import.sh

Lines changed: 4 additions & 4 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 !MINGW 'Apply a patch from a URL' '
166+
test_expect_success 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,13 +255,13 @@ test_expect_success 'Apply a series from a tarball' '
255255
stg delete ..
256256
'
257257

258-
test_expect_success !MINGW 'Apply a series from a tarball url' '
258+
test_expect_success 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) \
261261
| grep -c "tree 2c33937252a21f1550c0bf21f1de534b68f69635") = 1 ]
262262
'
263263

264-
test_expect_success MINGW 'Apply a series from a abs tarball path' '
264+
test_expect_success !STG_IMPORT_URL 'Apply a series from a abs tarball path' '
265265
stg import --series "$(pwd)/jabberwocky.tar.bz2" &&
266266
[ $(git cat-file -p $(stg id) \
267267
| grep -c "tree 2c33937252a21f1550c0bf21f1de534b68f69635") = 1 ]
@@ -356,7 +356,7 @@ test_expect_success 'Import series from stdin' '
356356
stg delete --top
357357
'
358358

359-
test_expect_success 'Attempt url' '
359+
test_expect_success STG_IMPORT_URL 'Attempt url' '
360360
general_error stg import --url 2>err &&
361361
grep -e "required arguments were not provided" err
362362
'

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 !MINGW 'Apply a patch from an 8bit-encoded e-mail url' '
24+
test_expect_success 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 !MINGW 'Apply several patches from an mbox url' '
121+
test_expect_success 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) \

t/test-lib.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1334,3 +1334,8 @@ test_lazy_prereq GITSENDEMAIL '
13341334
# test whether git send-email is available
13351335
git send-email --dump-aliases 2>/dev/null >/dev/null
13361336
'
1337+
1338+
test_lazy_prereq STG_IMPORT_URL '
1339+
# test whether stg import --url is available
1340+
stg import -h | grep "\--url"
1341+
'

0 commit comments

Comments
 (0)