summaryrefslogtreecommitdiff
path: root/rts.exp
diff options
context:
space:
mode:
Diffstat (limited to 'rts.exp')
-rw-r--r--rts.exp217
1 files changed, 217 insertions, 0 deletions
diff --git a/rts.exp b/rts.exp
new file mode 100644
index 0000000..fbea93b
--- /dev/null
+++ b/rts.exp
@@ -0,0 +1,217 @@
+--- tcpclient prints usage message without enough arguments
+tcpclient: usage: tcpclient [ -hHrRdDqQv ] [ -i localip ] [ -p localport ] [ -T timeoutconn ] [ -l localname ] [ -t timeoutinfo ] host port program
+100
+--- tcpclient prints error message with unknown port name
+tcpclient: fatal: unable to figure out port number for nonexistentport
+111
+--- tcpclient prints error message when connection fails
+tcpclient: unable to connect to 127.0.0.1 port 16: connection refused
+111
+--- tcpclient -q does not print error message when connection fails
+111
+--- tcpclient understands empty host name as synonym for 0
+tcpclient: unable to connect to 127.0.0.1 port 16: connection refused
+111
+--- tcpclient understands unbracketed IP address
+tcpclient: unable to connect to 127.0.0.1 port 16: connection refused
+111
+--- tcpclient understands bracketed IP address
+tcpclient: unable to connect to 127.0.0.1 port 16: connection refused
+111
+--- tcpclient prints error message with unknown host name
+tcpclient: fatal: unable to figure out IP address for nonexistent.local.
+111
+--- tcpserver prints usage message without enough arguments
+tcpserver: usage: tcpserver [ -1pPhHrRoOdDqQv ] [ -c limit ] [ -x rules.cdb ] [ -B banner ] [ -g gid ] [ -u uid ] [ -b backlog ] [ -l localname ] [ -t timeout ] host port program
+100
+--- tcpserver prints error message with unknown port name
+tcpserver: fatal: unable to figure out port number for nonexistentport
+111
+--- tcpserver prints error message with unknown host name
+tcpserver: fatal: unable to figure out IP address for nonexistent.local.
+111
+--- tcpserver prints error message with non-local host name
+tcpserver: fatal: unable to bind: address not available
+111
+--- tcpserver sets basic environment variables
+PROTO=TCP
+TCPLOCALHOST=Local
+TCPLOCALIP=127.0.0.1
+TCPLOCALPORT=50016
+TCPREMOTEHOST=
+TCPREMOTEIP=127.0.0.1
+TCPREMOTEPORT=50017
+TCPREMOTEINFO=
+0
+--- tcpclient sets basic environment variables
+PROTO=TCP
+TCPLOCALHOST=Local
+TCPLOCALIP=127.0.0.1
+TCPLOCALPORT=50017
+TCPREMOTEHOST=
+TCPREMOTEIP=127.0.0.1
+TCPREMOTEPORT=50016
+TCPREMOTEINFO=
+0
+--- tcpclient -v works
+tcpclient: connected to 127.0.0.1 port 50016
+ok
+0
+--- tcpserver prints error message with used port
+tcpserver: fatal: unable to bind: address already used
+111
+--- tcpcat works; tcpserver -B works
+bannerok
+0
+--- mconnect works
+bannerok
+0
+--- tcprules prints usage message without enough arguments
+tcprules: usage: tcprules rules.cdb rules.tmp
+100
+--- tcprules prints error message if it cannot create tmp
+tcprules: fatal: unable to create /dev/nonexistent/tmp: file does not exist
+111
+--- tcprules prints error message if it cannot move tmp to cdb
+tcprules: fatal: unable to move test.tmp to /dev/nonexistent/cdb: file does not exist
+111
+--- tcprules creates a cdb file
+0
+--- tcprulescheck sees deny
+rule 1.2.3.4:
+deny connection
+0
+--- tcprulescheck does not apply deny to another host
+default:
+allow connection
+0
+--- tcprules replaces a cdb file
+0
+--- tcprulescheck finds rule with address and info
+rule joe@127.0.0.1:
+set environment variable which=first
+allow connection
+0
+--- tcprulescheck finds rule with address
+rule 18.23.0.32:
+set environment variable which=second
+allow connection
+0
+--- tcprulescheck finds one-dot wildcard
+rule 127.:
+set environment variable which=third
+allow connection
+0
+--- tcprulescheck finds zero-dot wildcard
+rule :
+set environment variable which=fourth
+allow connection
+0
+--- tcprules handles comments, address ranges, multiple variables
+0
+rule 127.0.:
+set environment variable which=first
+set environment variable where=whatever
+allow connection
+rule 127.1.:
+set environment variable which=first
+set environment variable where=whatever
+allow connection
+rule 127.2.:
+set environment variable which=first
+set environment variable where=whatever
+allow connection
+rule 127.3.:
+set environment variable which=first
+set environment variable where=whatever
+allow connection
+rule 127.4.:
+set environment variable which=first
+set environment variable where=whatever
+allow connection
+rule 127.5.:
+set environment variable which=first
+set environment variable where=whatever
+allow connection
+default:
+allow connection
+default:
+allow connection
+default:
+allow connection
+default:
+allow connection
+default:
+allow connection
+--- addcr leaves an empty file alone
+0
+--- addcr leaves a partial final line alone
+test0
+--- addcr adds CR after the first line
+test^M
+0
+--- addcr adds CR after the second line
+test^M
+test2^M
+0
+--- addcr handles nulls
+t^@st^M
+0
+--- delcr leaves an empty file alone
+0
+--- delcr leaves a non-CR line alone
+test
+0
+--- delcr removes CR if a line has it
+test
+0
+--- delcr converts CR CR LF to CR LF
+test^M
+0
+--- delcr removes CR from a partial final line
+test0
+--- delcr handles a non-CR partial final line
+test0
+--- delcr handles nulls
+t^@st
+0
+--- fixcr leaves an empty file alone
+0
+--- fixcr leaves a partial final line alone
+test0
+--- fixcr adds CR after the first line
+test^M
+0
+--- fixcr adds CR after the second line
+test^M
+test2^M
+0
+--- fixcr does not add CR if a line has it
+test^M
+0
+--- fixcr handles nulls
+t^@st^M
+0
+--- recordio works
+... < test $
+... > test $
+... < [EOF]$
+... > [EOF]$
+--- recordio handles multiple-line packets
+... < test $
+... < test2 $
+... > test $
+... > test2 $
+... < [EOF]$
+... > [EOF]$
+--- recordio handles partial final lines
+... < test+$
+... > test+$
+... < [EOF]$
+... > [EOF]$
+--- argv0 works
+zero
+0
+--- argv0 requires arguments
+argv0: usage: argv0 realname program [ arg ... ]
+100