test687/688: two more basic --xattr tests

Closes #11697
This commit is contained in:
Daniel Stenberg 2023-08-19 23:33:25 +02:00
parent b3ee22193a
commit 73b6d4e814
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
3 changed files with 130 additions and 6 deletions

View File

@ -92,12 +92,12 @@ test599 test600 test601 test602 test603 test604 test605 test606 test607 \
test608 test609 test610 test611 test612 test613 test614 test615 test616 \
test617 test618 test619 test620 test621 test622 test623 test624 test625 \
test626 test627 test628 test629 test630 test631 test632 test633 test634 \
test635 test636 test637 test638 test639 test640 test641 test642 \
test643 test644 test645 test646 test647 test648 test649 test650 test651 \
test652 test653 test654 test655 test656 test658 test659 test660 test661 \
test662 test663 test664 test665 test666 test667 test668 test669 \
test670 test671 test672 test673 test674 test675 test676 test677 test678 \
test679 test680 test681 test682 test683 test684 test685 test686 \
test635 test636 test637 test638 test639 test640 test641 test642 test643 \
test644 test645 test646 test647 test648 test649 test650 test651 test652 \
test653 test654 test655 test656 test658 test659 test660 test661 test662 \
test663 test664 test665 test666 test667 test668 test669 test670 test671 \
test672 test673 test674 test675 test676 test677 test678 test679 test680 \
test681 test682 test683 test684 test685 test686 test687 test688 \
\
test700 test701 test702 test703 test704 test705 test706 test707 test708 \
test709 test710 test711 test712 test713 test714 test715 test716 test717 \

62
tests/data/test687 Normal file
View File

@ -0,0 +1,62 @@
<testcase>
<info>
<keywords>
HTTP
xattr
</keywords>
</info>
#
# Server-side
<reply>
<data nocheck="yes">
HTTP/1.1 200 OK
Date: Tue, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake
Accept-Ranges: bytes
Content-Length: 6
Connection: close
Content-Type: fake/data
-foo-
</data>
</reply>
#
# Client-side
<client>
<server>
http
</server>
<features>
debug
xattr
</features>
# simulate the xattr operations
<setenv>
CURL_FAKE_XATTR=1
</setenv>
<name>
basic --xattr with -o
</name>
<command>
http://%HOSTIP:%HTTPPORT/%TESTNUMBER --xattr -o %LOGDIR/out%TESTNUMBER
</command>
</client>
#
# Verify data after the test has been "shot"
<verify>
<protocol>
GET /%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
User-Agent: curl/%VERSION
Accept: */*
</protocol>
<stdout mode="text">
user.mime_type => fake/data
user.xdg.origin.url => http://%HOSTIP:%HTTPPORT/%TESTNUMBER
</stdout>
</verify>
</testcase>

62
tests/data/test688 Normal file
View File

@ -0,0 +1,62 @@
<testcase>
<info>
<keywords>
HTTP
xattr
</keywords>
</info>
#
# Server-side
<reply>
<data nocheck="yes">
HTTP/1.1 200 OK
Date: Tue, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake
Accept-Ranges: bytes
Content-Length: 6
Connection: close
Content-Type: fake/data
-foo-
</data>
</reply>
#
# Client-side
<client>
<server>
http
</server>
<features>
debug
xattr
</features>
# simulate the xattr operations
<setenv>
CURL_FAKE_XATTR=1
</setenv>
<name>
basic --xattr with -O
</name>
<command>
--xattr -O --output-dir %LOGDIR http://%HOSTIP:%HTTPPORT/%TESTNUMBER
</command>
</client>
#
# Verify data after the test has been "shot"
<verify>
<protocol>
GET /%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
User-Agent: curl/%VERSION
Accept: */*
</protocol>
<stdout mode="text">
user.mime_type => fake/data
user.xdg.origin.url => http://%HOSTIP:%HTTPPORT/%TESTNUMBER
</stdout>
</verify>
</testcase>