summaryrefslogtreecommitdiff
path: root/tests/FILEFORMAT.md
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-10-02 00:11:13 +0200
committerDaniel Stenberg <daniel@haxx.se>2020-10-02 09:35:38 +0200
commit2dd53e82f1ec3de8a9ecc1261ca4d9077506a9bb (patch)
treedf3a145f88537d2cc9e92776766bdd18feb0f2d9 /tests/FILEFORMAT.md
parent01327600e3a9f0bd23383eb21ad7dcdc84a0c249 (diff)
downloadcurl-2dd53e82f1ec3de8a9ecc1261ca4d9077506a9bb.tar.gz
runtests: allow generating a binary sequence from hex
Diffstat (limited to 'tests/FILEFORMAT.md')
-rw-r--r--tests/FILEFORMAT.md13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/FILEFORMAT.md b/tests/FILEFORMAT.md
index 09600d016..7748b6706 100644
--- a/tests/FILEFORMAT.md
+++ b/tests/FILEFORMAT.md
@@ -40,6 +40,19 @@ server's port number (in ASCII) followed by a space and the hexadecimal byte
%b64[%HTTPPORT %9a]b64%
+## Hexadecimal decoding
+
+In the preprocess stage, a special instruction can be used to have runtests.pl
+generate a sequence of binary bytes.
+
+To insert a sequence of bytes from a hex encoded string, use this syntax:
+
+ %hex[ %XX-encoded data to decode ]hex%
+
+For example, to insert the binary octets 0, 1 and 255 into the test file:
+
+ %hex[ %00%01%FF ]hex%
+
# Variables
When the test is preprocessed, a range of "variables" in the test file will be