#!/bin/sh
# Check that edbrowse can fetch and render a page over HTTP.
#
# On first start edbrowse writes its default config and exits without acting on
# its arguments, so the fetch has to be the second invocation. Getting this
# wrong is what broke the test in 3.8.18-1, and before that in 3.7.4-3.
set -e

export HOME="$AUTOPKGTEST_TMP"

printf 'q\n' | edbrowse >/dev/null 2>&1 || true

printf '1,$p\nq\n' | edbrowse http://www.debian.org | grep -q Debian
