File: testsuite_network_include.kbs

package info (click to toggle)
basic256 2.0.99.10-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,888 kB
  • sloc: cpp: 17,185; yacc: 4,025; lex: 1,466; java: 1,091; sh: 39; xml: 33; makefile: 20
file content (40 lines) | stat: -rw-r--r-- 937 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# testsuite_network_include section for BASIC256

# Modification History
# date		programmer	description
# 20140530	j.m.reneau	original Coding
# 20151206	j.m.reneau	moved question to do to main testsuite

currentsuite = "network"

call sne("my ip address",netaddress,"")

call q("Open another instance of basic256, load and run the program TestSuite/testsuite_network_helper.kbs then click yes.")

# connect to helper program's server
netconnect "127.0.0.1", 9999

# write a string - it will be echoed back with ++ added
# do this ten times
a$ = "abcdefghijklmnopqrstuvwxyz"
for t = 1 to 10
   netwrite a$
   b$ = netread
   call s("Network connect and echo " + t, "++"+a$+"++", b$)
   pause .1
next t
#
# tell the server to stop
netwrite "end"
b$ = netread
#
# close connection
netclose
#
# see if it really is closed
pause .1
try
   netconnect "127.0.0.1", 9999
catch
   call n("network unable to connect error", lasterror, 38)
end try