Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Depends: @, bash, chiark-really
Tests-Directory: tests
Restrictions: isolation-container, allow-stderr, needs-root, breaks-testbed
+
+Tests: t-persist
+Depends: @, bash
+Tests-Directory: tests
+Restrictions: isolation-container, allow-stderr, needs-root
--- /dev/null
+#!/bin/bash
+set -ex
+
+. tests/lib
+
+coproc userv --override 'execute cat -vet' games spong
+
+stdout=${COPROC[0]}
+stdin=${COPROC[1]}
+
+print_expect_reply () {
+ local m=$1
+ local got
+ echo >&$stdin "$m"
+ read <&$stdout got
+ local exp="$(printf '%s$\n' "$m")"
+ test "$got" = "$exp"
+}
+
+print_expect_reply hi
+
+service userv restart
+
+print_expect_reply ho
+
+echo ok.