mirror of
https://github.com/curl/curl.git
synced 2025-04-18 16:30:45 +08:00
tests: add file: tests with existing files
Windows sometimes has issues when opening the same file twice, so these test two situations where that could potentially occur. Reported-by: ralfjunker on github Ref: #15043 Closes #15045
This commit is contained in:
parent
dd0405c909
commit
8e9a8dd978
@ -193,7 +193,7 @@ test1455 test1456 test1457 test1458 test1459 test1460 test1461 test1462 \
|
||||
test1463 test1464 test1465 test1466 test1467 test1468 test1469 test1470 \
|
||||
test1471 test1472 test1473 test1474 test1475 test1476 test1477 test1478 \
|
||||
test1479 test1480 test1481 test1482 test1483 test1484 test1485 test1486 \
|
||||
test1487 test1488 test1489 \
|
||||
test1487 test1488 test1489 test1490 test1491 \
|
||||
\
|
||||
test1500 test1501 test1502 test1503 test1504 test1505 test1506 test1507 \
|
||||
test1508 test1509 test1510 test1511 test1512 test1513 test1514 test1515 \
|
||||
|
43
tests/data/test1490
Normal file
43
tests/data/test1490
Normal file
@ -0,0 +1,43 @@
|
||||
<testcase>
|
||||
<info>
|
||||
<keywords>
|
||||
FILE
|
||||
</keywords>
|
||||
</info>
|
||||
|
||||
# no Server-side
|
||||
|
||||
# Client-side
|
||||
<client>
|
||||
<server>
|
||||
file
|
||||
</server>
|
||||
<name>
|
||||
"upload" with file:// overwriting existing
|
||||
</name>
|
||||
<command option="no-include">
|
||||
file://localhost%FILE_PWD/%LOGDIR/result%TESTNUMBER.txt -T %LOGDIR/upload%TESTNUMBER.txt
|
||||
</command>
|
||||
<file name="%LOGDIR/upload%TESTNUMBER.txt">
|
||||
data
|
||||
in
|
||||
file
|
||||
to
|
||||
write
|
||||
</file>
|
||||
<file2 name="%LOGDIR/result%TESTNUMBER.txt">
|
||||
already existing
|
||||
</file2>
|
||||
</client>
|
||||
|
||||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
<file name="%LOGDIR/result%TESTNUMBER.txt">
|
||||
data
|
||||
in
|
||||
file
|
||||
to
|
||||
write
|
||||
</file>
|
||||
</verify>
|
||||
</testcase>
|
37
tests/data/test1491
Normal file
37
tests/data/test1491
Normal file
@ -0,0 +1,37 @@
|
||||
<testcase>
|
||||
<info>
|
||||
<keywords>
|
||||
FILE
|
||||
</keywords>
|
||||
</info>
|
||||
|
||||
<reply>
|
||||
</reply>
|
||||
|
||||
# Client-side
|
||||
<client>
|
||||
<server>
|
||||
file
|
||||
</server>
|
||||
<name>
|
||||
file:// don't overwrite self with --skip-existing
|
||||
</name>
|
||||
<command option="no-output">
|
||||
file://localhost%FILE_PWD/%LOGDIR/test%TESTNUMBER.txt -o %LOGDIR/test%TESTNUMBER.txt --skip-existing
|
||||
</command>
|
||||
<file name="%LOGDIR/test%TESTNUMBER.txt">
|
||||
foo
|
||||
bar
|
||||
bar
|
||||
foo
|
||||
moo
|
||||
</file>
|
||||
</client>
|
||||
|
||||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
<stderr mode="text">
|
||||
Note: skips transfer, "%LOGDIR/test%TESTNUMBER.txt" exists locally
|
||||
</stderr>
|
||||
</verify>
|
||||
</testcase>
|
@ -14,7 +14,7 @@ FAILURE
|
||||
file
|
||||
</server>
|
||||
<name>
|
||||
"upload" with file://
|
||||
"upload" nonexisting with file://
|
||||
</name>
|
||||
<command option="no-include">
|
||||
file://localhost/%PWD/%LOGDIR/nonexisting/result%TESTNUMBER.txt -T %LOGDIR/upload%TESTNUMBER.txt
|
||||
|
Loading…
x
Reference in New Issue
Block a user