Skip to content

Commit 6b31aa2

Browse files
committed
Test a TELNET connection.
1 parent 4767e3a commit 6b31aa2

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

test/test.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ build() {
2323
test -r simh/scp.c || git submodule update --init
2424
test -x simh/BIN/h316 || (build)
2525

26-
echo Starting ARPANET. Allow 30 seconds for IMP network to settle.
26+
echo "Starting ARPANET. Allow 30 seconds for IMP network to settle."
2727
./arpanet.sh start
2828
# Some time for NCP too.
2929
sleep 10
@@ -39,6 +39,7 @@ NCP=ncp2 $APPS/ncp-ping -c1 005 && fail
3939

4040
echo "Test RFC to socket without server."
4141
NCP=ncp3 $APPS/ncp-finger 002 && fail
42+
sleep 2
4243

4344
echo "Test ICP and simple data transfer using the Finger protocol."
4445
NCP=ncp2 $APPS/ncp-finser || fail &
@@ -48,4 +49,13 @@ NCP=ncp3 $APPS/ncp-finger 002 "Sample Finger command from client." || fail &
4849
sleep 3
4950
kill $! $PID 2>/dev/null || :
5051

52+
echo "Test a TELNET session."
53+
54+
NCP=ncp2 $APPS/ncp-telnet -bs || fail &
55+
PID=$!
56+
sleep 1
57+
(echo test; sleep 1) | NCP=ncp3 $APPS/ncp-telnet -bc 002 | grep -a Welcome || fail &
58+
sleep 3
59+
kill $! $PID 2>/dev/null && fail
60+
5161
exit $RESULT

0 commit comments

Comments
 (0)