quickjs-tart

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

test432 (1574B)


      1 <testcase>
      2 # Derived from on https://github.com/curl/curl/issues/5120
      3 <info>
      4 <keywords>
      5 --next
      6 --config
      7 POST
      8 </keywords>
      9 </info>
     10 
     11 #
     12 # Server-side
     13 <reply>
     14 <data1>
     15 HTTP/1.1 200 OK
     16 Content-Length: 6
     17 Content-Type: text/1
     18 
     19 -foo-
     20 </data1>
     21 <data2>
     22 HTTP/1.1 200 OK
     23 Content-Length: 6
     24 Content-Type: text/2
     25 
     26 -foo-
     27 </data2>
     28 <data3>
     29 HTTP/1.1 200 OK
     30 Content-Length: 6
     31 Content-Type: text/3
     32 
     33 -foo-
     34 </data3>
     35 </reply>
     36 
     37 #
     38 # Client-side
     39 <client>
     40 <file1 name="%LOGDIR/config%TESTNUMBER">
     41 --next
     42 url = %HOSTIP:%HTTPPORT/%TESTNUMBER0001
     43 header = "a: a"
     44 data = "a"
     45 --next
     46 url = %HOSTIP:%HTTPPORT/%TESTNUMBER0002
     47 header = "b: b"
     48 data = "b"
     49 config = "%LOGDIR/config%TESTNUMBER-c"
     50 </file1>
     51 <file2 name="%LOGDIR/config%TESTNUMBER-c">
     52 --next
     53 url = %HOSTIP:%HTTPPORT/%TESTNUMBER0003
     54 header = "c: c"
     55 data = "c"
     56 </file2>
     57 
     58 <server>
     59 http
     60 </server>
     61 <name>
     62 Use -K with --next and --config from within
     63 </name>
     64 <command>
     65 -K %LOGDIR/config%TESTNUMBER
     66 </command>
     67 </client>
     68 
     69 #
     70 # Verify data after the test has been "shot"
     71 <verify>
     72 <protocol nonewline="yes">
     73 POST /%TESTNUMBER0001 HTTP/1.1
     74 Host: %HOSTIP:%HTTPPORT
     75 User-Agent: curl/%VERSION
     76 Accept: */*
     77 a: a
     78 Content-Length: 1
     79 Content-Type: application/x-www-form-urlencoded
     80 
     81 aPOST /%TESTNUMBER0002 HTTP/1.1
     82 Host: %HOSTIP:%HTTPPORT
     83 User-Agent: curl/%VERSION
     84 Accept: */*
     85 b: b
     86 Content-Length: 1
     87 Content-Type: application/x-www-form-urlencoded
     88 
     89 bPOST /%TESTNUMBER0003 HTTP/1.1
     90 Host: %HOSTIP:%HTTPPORT
     91 User-Agent: curl/%VERSION
     92 Accept: */*
     93 c: c
     94 Content-Length: 1
     95 Content-Type: application/x-www-form-urlencoded
     96 
     97 c
     98 </protocol>
     99 </verify>
    100 </testcase>