]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
test458: verify --expand-output, expanding a file name accepting option
authorDaniel Stenberg <daniel@haxx.se>
Sat, 7 Oct 2023 18:37:38 +0000 (20:37 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 7 Oct 2023 22:29:36 +0000 (00:29 +0200)
Verifies the fix in #12055 (commit f2c8086ff15e6e995e1)

tests/data/Makefile.inc
tests/data/test458 [new file with mode: 0644]

index 081e344d46cf85b8b6d7333e9fcdddc0096e0525..2eb6b9d9818204ab4b95f25eba6af3c2fd2c7f77 100644 (file)
@@ -72,7 +72,7 @@ test417 test418 test419 test420 test421 test422 test423 test424 test425 \
 test426 test427 test428 test429 test430 test431 test432 test433 test434 \
 test435 test436 test437 test438 test439 test440 test441 test442 test443 \
 test444 test445 test446 test447 test448 test449 test450 test451 test452 \
-test453 test454 test455 test456 test457 \
+test453 test454 test455 test456 test457 test458 \
 \
 test490 test491 test492 test493 test494 test495 test496 test497 test498 \
 \
diff --git a/tests/data/test458 b/tests/data/test458
new file mode 100644 (file)
index 0000000..ce37945
--- /dev/null
@@ -0,0 +1,76 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+variables
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data crlf="yes" nocheck="yes">
+HTTP/1.1 200 OK
+Date: Tue, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
+ETag: "21025-dc7-39462498"
+Accept-Ranges: bytes
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Funny-head: yesyes
+
+-foo-
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+<setenv>
+FUNVALUE=contents%TESTNUMBER
+VALUE2=curl
+BLANK=
+</setenv>
+<name>
+variable expand the file name with --expand-output
+</name>
+<file name="%LOGDIR/cmd">
+--variable %FUNVALUE
+--expand-output %LOGDIR/{{FUNVALUE}}
+</file>
+<command option="no-output">
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER -K %LOGDIR/cmd
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol crlf="yes">
+GET /%TESTNUMBER HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+User-Agent: curl/%VERSION
+Accept: */*
+
+</protocol>
+<file name="%LOGDIR/contents%TESTNUMBER" crlf="yes">
+HTTP/1.1 200 OK
+Date: Tue, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
+ETag: "21025-dc7-39462498"
+Accept-Ranges: bytes
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Funny-head: yesyes
+
+-foo-
+</file>
+</verify>
+</testcase>