quickjs-tart

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

test18 (1149B)


      1 <testcase>
      2 <info>
      3 <keywords>
      4 HTTP
      5 HTTP GET
      6 globbing
      7 {} list
      8 </keywords>
      9 </info>
     10 # Server-side
     11 <reply>
     12 <data nocheck="yes">
     13 HTTP/1.1 200 OK
     14 Funny-head: yesyes
     15 Content-Length: 4
     16 
     17 moo
     18 </data>
     19 <data2>
     20 HTTP/1.1 200 OK
     21 Funny-head: yesyes
     22 Content-Length: 4
     23 
     24 foo
     25 </data2>
     26 <data3>
     27 HTTP/1.1 200 OK
     28 Funny-head: yesyes
     29 Content-Length: 4
     30 
     31 hoo
     32 </data3>
     33 </reply>
     34 
     35 # Client-side
     36 <client>
     37 <server>
     38 http
     39 </server>
     40 <name>
     41 multiple requests using {} in URL
     42 </name>
     43 <command>
     44 "%HOSTIP:%HTTPPORT/{%TESTNUMBER,%TESTNUMBER0002,%TESTNUMBER0003}"
     45 </command>
     46 </client>
     47 
     48 # Verify data after the test has been "shot"
     49 <verify>
     50 <protocol>
     51 GET /%TESTNUMBER HTTP/1.1
     52 Host: %HOSTIP:%HTTPPORT
     53 User-Agent: curl/%VERSION
     54 Accept: */*
     55 
     56 GET /%TESTNUMBER0002 HTTP/1.1
     57 Host: %HOSTIP:%HTTPPORT
     58 User-Agent: curl/%VERSION
     59 Accept: */*
     60 
     61 GET /%TESTNUMBER0003 HTTP/1.1
     62 Host: %HOSTIP:%HTTPPORT
     63 User-Agent: curl/%VERSION
     64 Accept: */*
     65 
     66 </protocol>
     67 <stdout>
     68 HTTP/1.1 200 OK
     69 Funny-head: yesyes
     70 Content-Length: 4
     71 
     72 moo
     73 HTTP/1.1 200 OK
     74 Funny-head: yesyes
     75 Content-Length: 4
     76 
     77 foo
     78 HTTP/1.1 200 OK
     79 Funny-head: yesyes
     80 Content-Length: 4
     81 
     82 hoo
     83 </stdout>
     84 </verify>
     85 </testcase>