quickjs-tart

quickjs-based runtime for wallet-core logic
Log | Files | Refs | README | LICENSE

test428 (1459B)


      1 <testcase>
      2 <info>
      3 <keywords>
      4 HTTP
      5 variables
      6 --config
      7 </keywords>
      8 </info>
      9 
     10 #
     11 # Server-side
     12 <reply>
     13 <data crlf="yes">
     14 HTTP/1.1 200 OK
     15 Date: Tue, 09 Nov 2010 14:49:00 GMT
     16 Server: test-server/fake
     17 Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
     18 ETag: "21025-dc7-39462498"
     19 Accept-Ranges: bytes
     20 Content-Length: 6
     21 Connection: close
     22 Content-Type: text/html
     23 Funny-head: yesyes
     24 
     25 -foo-
     26 </data>
     27 </reply>
     28 
     29 #
     30 # Client-side
     31 <client>
     32 
     33 # For unknown reasons, a number of CI jobs on Appveyor keep returning NULL to
     34 # getenv() for the blank environment variable which makes the test fail.
     35 # Unfortunately, this makes me disable the test completely on Windows.
     36 
     37 <features>
     38 !win32
     39 </features>
     40 <server>
     41 http
     42 </server>
     43 <setenv>
     44 FUNVALUE=contents
     45 VALUE2=curl
     46 BLANK=
     47 </setenv>
     48 <name>
     49 Expand environment variables within config file
     50 </name>
     51 <file name="%LOGDIR/cmd">
     52 --variable %FUNVALUE
     53 --variable %VALUE2
     54 --variable %BLANK
     55 --variable %curl_NOT_SET=default
     56 --expand-data 1{{FUNVALUE}}2{{VALUE2}}3{{curl_NOT_SET}}4{{BLANK}}5\{{verbatim}}6{{not.good}}7{{}}
     57 </file>
     58 <command>
     59 http://%HOSTIP:%HTTPPORT/%TESTNUMBER -K %LOGDIR/cmd
     60 </command>
     61 </client>
     62 
     63 #
     64 # Verify data after the test has been "shot"
     65 <verify>
     66 <protocol crlf="yes" nonewline="yes">
     67 POST /%TESTNUMBER HTTP/1.1
     68 Host: %HOSTIP:%HTTPPORT
     69 User-Agent: curl/%VERSION
     70 Accept: */*
     71 Content-Length: 54
     72 Content-Type: application/x-www-form-urlencoded
     73 
     74 1contents2curl3default45{{verbatim}}6{{not.good}}7{{}}
     75 </protocol>
     76 </verify>
     77 </testcase>