# testscript framework tests for fortio's main binary / command line
# Eventually we can convert most of Webtest.sh to here (except parts specifically about testing the Docker image)

# Basic usage test
!fortio
!stdout .
stderr 'Missing command argument'

# (short) version
fortio version
stdout '^dev$'
!stderr .

# (long) version
fortio buildinfo
stdout '^dev  go'
stdout 'path	fortio.org/fortio'
!stderr .

# Content-Type override through headers
fortio curl -H 'content-TYPE: foo/bar' -H 'xyz: bar blah' https://debug.fortio.org/test-path
stderr 'HTTP/1.1 200 OK'
stdout 'Xyz: bar blah'
stdout 'Content-Type: foo/bar'
stdout 'POST /test-path HTTP/1.1'
