move test to its files

This commit is contained in:
vaclavt
2022-05-05 18:01:19 +02:00
parent 062edbac3c
commit 8085397744
4 changed files with 38 additions and 23 deletions

19
tests/test_tcp.lsp Normal file
View File

@@ -0,0 +1,19 @@
(thread-create
(tcp-server 7777 (lambda (str) (list #f (+ "(print \"" (string-upcase str) "\")"))))
)
(thread-sleep 1)
(thread-create
(def code (tcp-client "127.0.0.1" 7777 ("abcd" "xyz")))
(for c code
(print "executing code:" c)
(eval (parse c))
)
(def code (tcp-client "127.0.0.1" 7777 "abcd"))
(print "executing code:" code)
(eval (parse code))
)
(threads-join)
(print "ok")