From f94e8bc746088340915ddf0d98fee2e15615f8ea Mon Sep 17 00:00:00 2001 From: Dirk Zimoch Date: Tue, 19 Jun 2018 14:41:25 +0200 Subject: [PATCH] simplify most commonly uses test commands --- streamApp/tests/streamtestlib.tcl | 8 + streamApp/tests/test64Bit | 16 +- streamApp/tests/testBo | 4 +- streamApp/tests/testCharset | 36 ++-- streamApp/tests/testChecksum | 2 +- streamApp/tests/testCompare | 6 +- streamApp/tests/testDefaultInput | 8 +- streamApp/tests/testDouble | 46 ++--- streamApp/tests/testEnum | 44 ++-- streamApp/tests/testFormatm | 24 +-- streamApp/tests/testFormats | 30 +-- streamApp/tests/testHalfInputTerminator | 6 +- streamApp/tests/testInteger | 240 +++++++++++----------- streamApp/tests/testIoIntrPollTimeout | 2 +- streamApp/tests/testLongInputTerminator | 6 +- streamApp/tests/testLongUnsolicitedInput | 4 +- streamApp/tests/testMultiLineFormatString | 2 +- streamApp/tests/testOutTerminators | 4 +- streamApp/tests/testParallelAccess | 4 +- streamApp/tests/testPercent | 2 +- streamApp/tests/testPerformance | 4 +- streamApp/tests/testQuotes | 2 +- streamApp/tests/testRaw | 28 +-- streamApp/tests/testRawFloat | 8 +- streamApp/tests/testSeverityAndStatus | 20 +- streamApp/tests/testSkeleton | 2 +- streamApp/tests/testSpyOnLongInput | 8 +- streamApp/tests/testStrangesum | 2 +- streamApp/tests/testString | 42 ++-- streamApp/tests/testTimestamp | 44 ++-- streamApp/tests/testWaage | 4 +- streamApp/tests/testWaveform | 30 +-- 32 files changed, 348 insertions(+), 340 deletions(-) mode change 100755 => 100644 streamApp/tests/testPerformance diff --git a/streamApp/tests/streamtestlib.tcl b/streamApp/tests/streamtestlib.tcl index 08db47b..9c7f2eb 100644 --- a/streamApp/tests/streamtestlib.tcl +++ b/streamApp/tests/streamtestlib.tcl @@ -95,6 +95,14 @@ proc ioccmd {command} { puts $ioc $command } +proc process {record} { + ioccmd "dbpf $record.PROC 1" +} + +proc put {record value} { + ioccmd "dbpf $record \"$value\"" +} + proc send {string} { global sock lastsent set lastsent $string diff --git a/streamApp/tests/test64Bit b/streamApp/tests/test64Bit index 3a960fa..c10c097 100755 --- a/streamApp/tests/test64Bit +++ b/streamApp/tests/test64Bit @@ -71,24 +71,24 @@ set startup { set debug 0 startioc -ioccmd {dbpf DZ:ao -1} +put DZ:ao -1 assure "ao -1.000 -1 -1.000 -1\n" -ioccmd {dbpf DZ:longout -1} +put DZ:longout -1 assure "longout -1 -1\n" -ioccmd {dbpf DZ:bo 1} +put DZ:bo 1 assure "bo 4294967295 ffffffff 11111111111111111111111111111111\n" -ioccmd {dbpf DZ:mbbo -1} +put DZ:mbbo -1 assure "mbbo 4294967295 ffffffff 11111111111111111111111111111111\n" -ioccmd {dbpf DZ:mbboDirect.B0 1} +put DZ:mbboDirect.B0 1 assure "mbboDirect 1 1 1\n" #Writing to mbboDirect.VAL is not supported by EPICS -#ioccmd {dbpf DZ:mbboDirect -1} +#put DZ:mbboDirect -1 #assure "mbboDirect 65535 ffff 1111111111111111\n" -ioccmd {dbpf DZ:ai.PROC 1} +process DZ:ai assure "ai?\n" send "-1\n" assure "ai -1\n" -ioccmd {dbpf DZ:longin.PROC 1} +process DZ:longin assure "longin?\n" send "-1\n" assure "longin -1\n" diff --git a/streamApp/tests/testBo b/streamApp/tests/testBo index 6273fba..397b4ca 100755 --- a/streamApp/tests/testBo +++ b/streamApp/tests/testBo @@ -27,9 +27,9 @@ set debug 0 startioc -ioccmd {dbpf DZ:test1 0} +put DZ:test1 0 assure "0 \x00 OFF" -ioccmd {dbpf DZ:test1 1} +put DZ:test1 1 assure "1 \x01 ON" finish diff --git a/streamApp/tests/testCharset b/streamApp/tests/testCharset index 2f44b5d..77b26c5 100755 --- a/streamApp/tests/testCharset +++ b/streamApp/tests/testCharset @@ -46,61 +46,61 @@ set debug 0 startioc -ioccmd {dbpf DZ:test1.PROC 1} +process DZ:test1 send "This is a test\n" assure "This| is a test\n" -ioccmd {dbpf DZ:test1.PROC 1} +process DZ:test1 send "Test123]bla\n" assure "Test123|]bla\n" -ioccmd {dbpf DZ:test1.PROC 1} +process DZ:test1 send "Test123456\n" assure "Test12345|6\n" -ioccmd {dbpf DZ:test1.PROC 1} +process DZ:test1 send "Test43210\n" assure "Test4321|0\n" -ioccmd {dbpf DZ:test1.PROC 1} +process DZ:test1 send "test-bla\n" assure "test|-bla\n" -ioccmd {dbpf DZ:test1.PROC 1} +process DZ:test1 send " Space first\n" assure "| Space first\n" -ioccmd {dbpf DZ:test2.PROC 1} +process DZ:test2 send "This is a test\n" assure "This is a test|\n" -ioccmd {dbpf DZ:test2.PROC 1} +process DZ:test2 send "Test]xx123bla\n" assure "Test]xx|123bla\n" -ioccmd {dbpf DZ:test2.PROC 1} +process DZ:test2 send "test-bla\n" assure "test|-bla\n" -ioccmd {dbpf DZ:test2.PROC 1} +process DZ:test2 send " Space first\n" assure " Space first|\n" -ioccmd {dbpf DZ:test3.PROC 1} +process DZ:test3 send "this is a test\n" assure "this is a test|\n" -ioccmd {dbpf DZ:test3.PROC 1} +process DZ:test3 send "test]xx123bla\n" assure "test|]xx123bla\n" -ioccmd {dbpf DZ:test3.PROC 1} +process DZ:test3 send "test-bla\n" assure "test-bla|\n" -ioccmd {dbpf DZ:test3.PROC 1} +process DZ:test3 send " Space first\n" assure " |Space first\n" -ioccmd {dbpf DZ:test4.PROC 1} +process DZ:test4 send "this is a test\n" assure "this is a test|\n" -ioccmd {dbpf DZ:test4.PROC 1} +process DZ:test4 send "test]xx123bla\n" assure "test|]xx123bla\n" -ioccmd {dbpf DZ:test4.PROC 1} +process DZ:test4 send "test-bla\n" assure "test|-bla\n" -ioccmd {dbpf DZ:test4.PROC 1} +process DZ:test4 send " Space first\n" assure " |Space first\n" diff --git a/streamApp/tests/testChecksum b/streamApp/tests/testChecksum index bc8320c..b4cf632 100755 --- a/streamApp/tests/testChecksum +++ b/streamApp/tests/testChecksum @@ -242,7 +242,7 @@ set startup { set debug 0 startioc -ioccmd {dbpf DZ:test1 "123456789"} +put DZ:test1 "123456789" assure "sum 123456789 \xDD\n" send "sum 123456789 \xDD\n" assure "sum8 123456789 \xDD\n" diff --git a/streamApp/tests/testCompare b/streamApp/tests/testCompare index de0bcdf..b2f4ad1 100755 --- a/streamApp/tests/testCompare +++ b/streamApp/tests/testCompare @@ -27,15 +27,15 @@ set debug 0 startioc -ioccmd {dbpf DZ:test1 3.14} +put DZ:test1 3.14 assure "set 3.14\n" send "ack 3.14 X\n" assure "OK\n" -ioccmd {dbpf DZ:test1 0} +put DZ:test1 0 assure "set 0.00\n" send "ack 0.00 X\n" assure "OK\n" -ioccmd {dbpf DZ:test1 1} +put DZ:test1 1 assure "set 1.00\n" send "ack 1.0 X\n" assure "mismatch\n" diff --git a/streamApp/tests/testDefaultInput b/streamApp/tests/testDefaultInput index 9e7dff3..863d504 100755 --- a/streamApp/tests/testDefaultInput +++ b/streamApp/tests/testDefaultInput @@ -32,22 +32,22 @@ set debug 0 startioc -ioccmd {dbpf DZ:test1.PROC 1} +process DZ:test1 assure "integer\n"; send "n: -12 xx\n"; assure "n = -12\n"; -ioccmd {dbpf DZ:test1.PROC 1} +process DZ:test1 assure "integer\n"; send "n: xx\n"; assure "n = 0\n"; -ioccmd {dbpf DZ:test2.PROC 1} +process DZ:test2 assure "double\n"; send "n: 3.1415 xx\n"; assure "n = 3.1415\n"; -ioccmd {dbpf DZ:test2.PROC 1} +process DZ:test2 assure "double\n"; send "n: xx\n"; assure "n = 0.0000\n"; diff --git a/streamApp/tests/testDouble b/streamApp/tests/testDouble index 695ab57..a0d3eb3 100755 --- a/streamApp/tests/testDouble +++ b/streamApp/tests/testDouble @@ -46,76 +46,76 @@ startioc set inf [format %f inf] if [catch {set nan [format %f nan]}] {set nan nan} -ioccmd {dbpf DZ:test1.PROC 1} +process DZ:test1 send "3.14159265359\n" assure "|3.141593| 3.141593|3.14| 3.14159 | 3.141593|+3.141593|3.1 |3.141593|\n" -ioccmd {dbpf DZ:test1.PROC 1} +process DZ:test1 send "-3.14159265359\n" assure "|-3.141593| -3.141593|-3.14|-3.14159 |-3.141593|-3.141593|-3.1 |-3.141593|\n" -ioccmd {dbpf DZ:test1.PROC 1} +process DZ:test1 send "0\n" assure "|0.000000| 0.000000|0.00| 0.00000 | 0.000000|+0.000000|0.0 |0.000000|\n" -ioccmd {dbpf DZ:test1.PROC 1} +process DZ:test1 send "NAN\n" assure "|$nan| $nan|$nan| $nan | $nan|+$nan|$nan |$nan|\n" -ioccmd {dbpf DZ:test1.PROC 1} +process DZ:test1 send "-Inf\n" assure "|-$inf| -$inf|-$inf|-$inf |-$inf|-$inf|-$inf |-$inf|\n" -ioccmd {dbpf DZ:test1.PROC 1} +process DZ:test1 send "1e6\n" assure "|1000000.000000|1000000.000000|1000000.00| 1000000.00000| 1000000.000000|+1000000.000000|1000000.0|1000000.000000|\n" -ioccmd {dbpf DZ:test1.PROC 1} +process DZ:test1 send " - 3.14159265359\n" assure "mismatch\n" -ioccmd {dbpf DZ:test1.PROC 1} +process DZ:test1 send "bla\n" assure "mismatch\n" -ioccmd {dbpf DZ:test1.PROC 1} +process DZ:test1 send " bla\n" assure "mismatch\n" -ioccmd {dbpf DZ:test1.PROC 1} +process DZ:test1 send "-bla\n" assure "mismatch\n" -ioccmd {dbpf DZ:test2.PROC 1} +process DZ:test2 send "3.14159265359\n" assure "|3.1415|9265359|\n" -ioccmd {dbpf DZ:test2.PROC 1} +process DZ:test2 send " 3.14159265359\n" assure "|3.1415|9265359|\n" -ioccmd {dbpf DZ:test2.PROC 1} +process DZ:test2 send " 10blabla\n" assure "|10|blabla|\n" -ioccmd {dbpf DZ:test2.PROC 1} +process DZ:test2 send " 1\n" assure "|1||\n" -ioccmd {dbpf DZ:test3.PROC 1} +process DZ:test3 send "3.14159265359\n" assure "|3.1415|9265359|\n" -ioccmd {dbpf DZ:test3.PROC 1} +process DZ:test3 send " 3.14159265359\n" assure "|3|.14159265359|\n" -ioccmd {dbpf DZ:test3.PROC 1} +process DZ:test3 send " 10blabla\n" assure "|10|blabla|\n" -ioccmd {dbpf DZ:test3.PROC 1} +process DZ:test3 send " 1\n" assure "|1||\n" -ioccmd {dbpf DZ:test4.PROC 1} +process DZ:test4 send "3.14159265359\n" assure "3.141593\n" -ioccmd {dbpf DZ:test4.PROC 1} +process DZ:test4 send " -3.14159265359\n" assure "-3.141593\n" -ioccmd {dbpf DZ:test4.PROC 1} +process DZ:test4 send " - 3.14159265359\n" assure "-3.141593\n" -ioccmd {dbpf DZ:test4.PROC 1} +process DZ:test4 send " + 3.14159265359\n" assure "3.141593\n" -ioccmd {dbpf DZ:test4.PROC 1} +process DZ:test4 send " +- 3.14159265359\n" assure "mismatch\n" diff --git a/streamApp/tests/testEnum b/streamApp/tests/testEnum index c87613c..f7854ae 100755 --- a/streamApp/tests/testEnum +++ b/streamApp/tests/testEnum @@ -63,62 +63,62 @@ set debug 0 startioc -ioccmd {dbpf DZ:testout 0} +put DZ:testout 0 assure "zerobla\n" -ioccmd {dbpf DZ:testout 1} +put DZ:testout 1 assure "onebla\n" -ioccmd {dbpf DZ:testout 2} +put DZ:testout 2 assure "twobla\n" -ioccmd {dbpf DZ:testout1 0} +put DZ:testout1 0 assure "zerobla\n" -ioccmd {dbpf DZ:testout1 1} +put DZ:testout1 1 assure "onebla\n" -ioccmd {dbpf DZ:testout1 2} +put DZ:testout1 2 assure "twobla\n" -ioccmd {dbpf DZ:testout2 -1} +put DZ:testout2 -1 assure "zerobla\n" -ioccmd {dbpf DZ:testout2 0} +put DZ:testout2 0 assure "onebla\n" -ioccmd {dbpf DZ:testout2 5} +put DZ:testout2 5 assure "twobla\n" -ioccmd {dbpf DZ:testout2 17} +put DZ:testout2 17 assure "defaultbla\n" -ioccmd {dbpf DZ:testin.PROC 1} +process DZ:testin send "zerobla\n" assure "0\n" -ioccmd {dbpf DZ:testin.PROC 1} +process DZ:testin send "onebla\n" assure "1\n" -ioccmd {dbpf DZ:testin.PROC 1} +process DZ:testin send "twobla\n" assure "2\n" -ioccmd {dbpf DZ:testin1.PROC 1} +process DZ:testin1 send "zerobla\n" assure "0\n" -ioccmd {dbpf DZ:testin1.PROC 1} +process DZ:testin1 send "onebla\n" assure "1\n" -ioccmd {dbpf DZ:testin1.PROC 1} +process DZ:testin1 send "twobla\n" assure "2\n" -ioccmd {dbpf DZ:testin2.PROC 1} +process DZ:testin2 send "zerobla\n" assure "-1\n" -ioccmd {dbpf DZ:testin2.PROC 1} +process DZ:testin2 send "onebla\n" assure "0\n" -ioccmd {dbpf DZ:testin2.PROC 1} +process DZ:testin2 send "twobla\n" assure "5\n" -ioccmd {dbpf DZ:testin3.PROC 1} +process DZ:testin3 send "\000bla\n" assure "0\n" -ioccmd {dbpf DZ:testin3.PROC 1} +process DZ:testin3 send "\rbla\n" assure "1\n" -ioccmd {dbpf DZ:testin3.PROC 1} +process DZ:testin3 send "bla\n" assure "2\n" diff --git a/streamApp/tests/testFormatm b/streamApp/tests/testFormatm index 63a4e98..156b4f0 100755 --- a/streamApp/tests/testFormatm +++ b/streamApp/tests/testFormatm @@ -32,35 +32,35 @@ set debug 0 startioc -ioccmd {dbpf DZ:ao 0} +put DZ:ao 0 assure "'000000+00' '0000+00' '+0000+00' ' 0000+00' '+0000+00' ' 0000+00' '0000+00 '\n" -ioccmd {dbpf DZ:ao 1} +put DZ:ao 1 assure "'100000-05' '1000-03' '+1000-03' ' 1000-03' '+1000-03' ' 1000-03' '1000-03 '\n" -ioccmd {dbpf DZ:ao 1000} +put DZ:ao 1000 assure "'100000-02' '1000+00' '+1000+00' ' 1000+00' '+1000+00' ' 1000+00' '1000+00 '\n" -ioccmd {dbpf DZ:ao 1000000} +put DZ:ao 1000000 assure "'100000+01' '1000+03' '+1000+03' ' 1000+03' '+1000+03' ' 1000+03' '1000+03 '\n" -ioccmd {dbpf DZ:ao -1} +put DZ:ao -1 assure "'-100000-05' '-1000-03' '-1000-03' '-1000-03' '-1000-03' ' -1000-03' '-1000-03 '\n" -ioccmd {dbpf DZ:ao 12345} +put DZ:ao 12345 assure "'123450-01' '1235+01' '+1235+01' ' 1235+01' '+1235+01' ' 1235+01' '1235+01 '\n" -ioccmd {dbpf DZ:ao -1.2345e-15} +put DZ:ao -1.2345e-15 assure "'-123450-20' '-1235-18' '-1235-18' '-1235-18' '-1235-18' ' -1235-18' '-1235-18 '\n" -ioccmd {dbpf DZ:ao 1e-100} +put DZ:ao 1e-100 assure "'100000-105' '1000-103' '+1000-103' ' 1000-103' '+1000-103' ' 1000-103' '1000-103 '\n" -ioccmd {dbpf DZ:ai.PROC 1} +process DZ:ai assure "?\n" send "+1234+56\n" assure "1.2340e+59\n" -ioccmd {dbpf DZ:ai.PROC 1} +process DZ:ai assure "?\n" send "-1234-56\n" assure "-1.2340e-53\n" -ioccmd {dbpf DZ:ai.PROC 1} +process DZ:ai assure "?\n" send "-12340000-60\n" assure "-1.2340e-53\n" -ioccmd {dbpf DZ:ai.PROC 1} +process DZ:ai assure "?\n" send "+00000000+0\n" assure "0.0000e+00\n" diff --git a/streamApp/tests/testFormats b/streamApp/tests/testFormats index d1dbae9..2ade7c8 100755 --- a/streamApp/tests/testFormats +++ b/streamApp/tests/testFormats @@ -58,51 +58,51 @@ startioc # This is normal. E.g. -1 HAS a different number of 1 bits. # Specify the width field in the format if this is a problem. -ioccmd {dbpf DZ:percent 1} +put DZ:percent 1 assure "%%%%%%%\n" -ioccmd {dbpf DZ:ao 0} +put DZ:ao 0 assure "0.00 0.00e+00 0.00E+00 0 0 32767 32767 32767 77777 7fff 0.00 0.00e+00 0.00E+00 0.0 0.0 32767 32767 32767 077777 0x7fff\n" -ioccmd {dbpf DZ:ao 10} +put DZ:ao 10 assure "10.00 1.00e+01 1.00E+01 10 10 65535 65535 65535 177777 ffff 10.00 1.00e+01 1.00E+01 10. 10. 65535 65535 65535 0177777 0xffff\n" -ioccmd {dbpf DZ:ao -10} +put DZ:ao -10 assure "-10.00 -1.00e+01 -1.00E+01 -10 -10 0 0 0 0 0000 -10.00 -1.00e+01 -1.00E+01 -10. -10. 0 0 0 0 000000\n" -ioccmd {dbpf DZ:ao 1e-6} +put DZ:ao 1e-6 assure "0.00 1.00e-06 1.00E-06 1e-06 1E-06 32768 32768 32768 100000 8000 0.00 1.00e-06 1.00E-06 1.0e-06 1.0E-06 32768 32768 32768 0100000 0x8000\n" -ioccmd {dbpf DZ:lo 0} +put DZ:lo 0 assure "0 0 000000 0 000000 0 000000 000000 . ......\n" -ioccmd {dbpf DZ:lo 12345} +put DZ:lo 12345 assure "12345 12345 012345 3039 003039 11000000111001 11000000111001 111001 !!......!!!..! !!......!!!..!\n" -ioccmd {dbpf DZ:lo 2147483647} +put DZ:lo 2147483647 assure "2147483647 2147483647 2147483647 7fffffff FFFFFF 1111111111111111111111111111111 1111111111111111111111111111111 111111 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n" -ioccmd {dbpf DZ:lo -1} +put DZ:lo -1 if {$tcl_platform(machine) == "x86_64"} { assure "-1 -1 -00001 ffffffffffffffff FFFFFF 1111111111111111111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111111111111111111111111 111111 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n" } else { assure "-1 -1 -00001 ffffffff FFFFFF 11111111111111111111111111111111 11111111111111111111111111111111 111111 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n" } -ioccmd {dbpf DZ:lo -1234} +put DZ:lo -1234 if {$tcl_platform(machine) == "x86_64"} { assure "-1234 -1234 -01234 fffffffffffffb2e FFFB2E 1111111111111111111111111111111111111111111111111111101100101110 1111111111111111111111111111111111111111111111111111101100101110 101110 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!.!!..!.!!!. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!.!!..!.!!!.\n" } else { assure "-1234 -1234 -01234 fffffb2e FFFB2E 11111111111111111111101100101110 11111111111111111111101100101110 101110 !!!!!!!!!!!!!!!!!!!!!.!!..!.!!!. !!!!!!!!!!!!!!!!!!!!!.!!..!.!!!.\n" } -ioccmd {dbpf DZ:lo 255} +put DZ:lo 255 assure "255 255 000255 ff 0000FF 11111111 11111111 111111 !!!!!!!! !!!!!!!!\n" -ioccmd {dbpf DZ:lo 65535} +put DZ:lo 65535 assure "65535 65535 065535 ffff 00FFFF 1111111111111111 1111111111111111 111111 !!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!\n" -ioccmd {dbpf DZ:bcd 1020304} +put DZ:bcd 1020304 if {$tcl_platform(machine) == "x86_64"} { assure "\0\0\0\0\1\2\3\4 \0\0\0\0\1\2\3\4 \4 \3\4 \2\3\4 \1\2\3\4 \4\3\2\1\0\0\0\0 \4\3\2\1\0\0\0\0 \4 \4\3 \4\3\2\n" } else { assure "\1\2\3\4 \0\0\1\2\3\4 \4 \3\4 \2\3\4 \1\2\3\4 \4\3\2\1 \4\3\2\1\0\0 \4 \4\3 \4\3\2\n" } -ioccmd {dbpf DZ:sbcd 1020304} +put DZ:sbcd 1020304 if {$tcl_platform(machine) == "x86_64"} { assure "\0\0\0\0\0\1\2\3\4 \0\0\0\0\0\1\2\3\4 \0\4 \3\4 \0\2\3\4 \0\1\2\3\4 \4\3\2\1\0\0\0\0\0 \4\3\2\1\0\0\0\0\0 \4\0 \4\3 \4\3\2\0\n" } else { assure "\0\1\2\3\4 \0\0\0\1\2\3\4 \0\4 \3\4 \0\2\3\4 \0\1\2\3\4 \4\3\2\1\0 \4\3\2\1\0\0\0 \4\0 \4\3 \4\3\2\0\n" } -ioccmd {dbpf DZ:sbcd -1020304} +put DZ:sbcd -1020304 if {$tcl_platform(machine) == "x86_64"} { assure "\xf0\0\0\0\0\1\2\3\4 \xf0\0\0\0\0\1\2\3\4 \xf0\4 \xf3\4 \xf0\2\3\4 \xf0\1\2\3\4 \4\3\2\1\0\0\0\0\xf0 \4\3\2\1\0\0\0\0\xf0 \4\xf0 \4\xf3 \4\3\2\xf0\n" } else { diff --git a/streamApp/tests/testHalfInputTerminator b/streamApp/tests/testHalfInputTerminator index 5743694..db33e90 100755 --- a/streamApp/tests/testHalfInputTerminator +++ b/streamApp/tests/testHalfInputTerminator @@ -26,17 +26,17 @@ set debug 0 startioc -ioccmd {dbpf DZ:test1.PROC 1} +process DZ:test1 assure "Give input\r\n" send "abc\r\n" assure "abc\r\n" -ioccmd {dbpf DZ:test1.PROC 1} +process DZ:test1 assure "Give input\r\n" send "x\r\n" assure "x\r\n" -ioccmd {dbpf DZ:test1.PROC 1} +process DZ:test1 assure "Give input\r\n" send "\r\n" assure "\r\n" diff --git a/streamApp/tests/testInteger b/streamApp/tests/testInteger index 62bc314..7b82998 100755 --- a/streamApp/tests/testInteger +++ b/streamApp/tests/testInteger @@ -90,373 +90,373 @@ set debug 0 startioc -ioccmd {dbpf DZ:test1.PROC 1} +process DZ:test1 send "12345\n" assure "12345\n" -ioccmd {dbpf DZ:test1.PROC 1} +process DZ:test1 send "-12345\n" assure "-12345\n" -ioccmd {dbpf DZ:test1.PROC 1} +process DZ:test1 send " 12345\n" assure "12345\n" -ioccmd {dbpf DZ:test1.PROC 1} +process DZ:test1 send " -12345\n" assure "-12345\n" -ioccmd {dbpf DZ:test1.PROC 1} +process DZ:test1 send "- 12345\n" assure "mismatch\n" -ioccmd {dbpf DZ:test1.PROC 1} +process DZ:test1 send "\n" assure "mismatch\n" -ioccmd {dbpf DZ:test1.PROC 1} +process DZ:test1 send " \n" assure "mismatch\n" -ioccmd {dbpf DZ:test1.PROC 1} +process DZ:test1 send " 0x12345\n" assure "74565\n" -ioccmd {dbpf DZ:test1.PROC 1} +process DZ:test1 send " 012345\n" assure "5349\n" -ioccmd {dbpf DZ:test1.PROC 1} +process DZ:test1 send "-0x12345\n" assure "-74565\n" -ioccmd {dbpf DZ:test1.PROC 1} +process DZ:test1 send "0xffffffff\n" assure "-1\n" -ioccmd {dbpf DZ:test1.PROC 1} +process DZ:test1 send "-0xffffffff\n" assure "1\n" -ioccmd {dbpf DZ:test2.PROC 1} +process DZ:test2 send "12345\n" assure "12345\n" -ioccmd {dbpf DZ:test2.PROC 1} +process DZ:test2 send "-12345\n" assure "-12345\n" -ioccmd {dbpf DZ:test2.PROC 1} +process DZ:test2 send " 12345\n" assure "12345\n" -ioccmd {dbpf DZ:test2.PROC 1} +process DZ:test2 send " -12345\n" assure "-12345\n" -ioccmd {dbpf DZ:test2.PROC 1} +process DZ:test2 send "- 12345\n" assure "mismatch\n" -ioccmd {dbpf DZ:test2.PROC 1} +process DZ:test2 send "\n" assure "mismatch\n" -ioccmd {dbpf DZ:test2.PROC 1} +process DZ:test2 send " \n" assure "mismatch\n" -ioccmd {dbpf DZ:test2.PROC 1} +process DZ:test2 send " 0x12345\n" assure "0\n" -ioccmd {dbpf DZ:test2.PROC 1} +process DZ:test2 send " 012345\n" assure "12345\n" -ioccmd {dbpf DZ:test2.PROC 1} +process DZ:test2 send "-0x12345\n" assure "0\n" -ioccmd {dbpf DZ:test2.PROC 1} +process DZ:test2 send "0xffffffff\n" assure "0\n" -ioccmd {dbpf DZ:test2.PROC 1} +process DZ:test2 send "-0xffffffff\n" assure "0\n" -ioccmd {dbpf DZ:test3.PROC 1} +process DZ:test3 send "12345\n" assure "12345\n" -ioccmd {dbpf DZ:test3.PROC 1} +process DZ:test3 send "-12345\n" assure "mismatch\n" -ioccmd {dbpf DZ:test3.PROC 1} +process DZ:test3 send " 12345\n" assure "12345\n" -ioccmd {dbpf DZ:test3.PROC 1} +process DZ:test3 send " -12345\n" assure "mismatch\n" -ioccmd {dbpf DZ:test3.PROC 1} +process DZ:test3 send "- 12345\n" assure "mismatch\n" -ioccmd {dbpf DZ:test3.PROC 1} +process DZ:test3 send "\n" assure "mismatch\n" -ioccmd {dbpf DZ:test3.PROC 1} +process DZ:test3 send " \n" assure "mismatch\n" -ioccmd {dbpf DZ:test3.PROC 1} +process DZ:test3 send " 0x12345\n" assure "0\n" -ioccmd {dbpf DZ:test3.PROC 1} +process DZ:test3 send " 012345\n" assure "12345\n" -ioccmd {dbpf DZ:test3.PROC 1} +process DZ:test3 send "-0x12345\n" assure "mismatch\n" -ioccmd {dbpf DZ:test3.PROC 1} +process DZ:test3 send "0xffffffff\n" assure "0\n" -ioccmd {dbpf DZ:test3.PROC 1} +process DZ:test3 send "-0xffffffff\n" assure "mismatch\n" -ioccmd {dbpf DZ:test4.PROC 1} +process DZ:test4 send "12345\n" assure "12345\n" -ioccmd {dbpf DZ:test4.PROC 1} +process DZ:test4 send "-12345\n" assure "mismatch\n" -ioccmd {dbpf DZ:test4.PROC 1} +process DZ:test4 send " 12345\n" assure "12345\n" -ioccmd {dbpf DZ:test4.PROC 1} +process DZ:test4 send " -12345\n" assure "mismatch\n" -ioccmd {dbpf DZ:test4.PROC 1} +process DZ:test4 send "- 12345\n" assure "mismatch\n" -ioccmd {dbpf DZ:test4.PROC 1} +process DZ:test4 send "\n" assure "mismatch\n" -ioccmd {dbpf DZ:test4.PROC 1} +process DZ:test4 send " \n" assure "mismatch\n" -ioccmd {dbpf DZ:test4.PROC 1} +process DZ:test4 send " 0x12345\n" assure "12345\n" -ioccmd {dbpf DZ:test4.PROC 1} +process DZ:test4 send " 012345\n" assure "12345\n" -ioccmd {dbpf DZ:test4.PROC 1} +process DZ:test4 send "-0x12345\n" assure "mismatch\n" -ioccmd {dbpf DZ:test4.PROC 1} +process DZ:test4 send "0xffffffff\n" assure "ffffffff\n" -ioccmd {dbpf DZ:test4.PROC 1} +process DZ:test4 send "-0xffffffff\n" assure "mismatch\n" -ioccmd {dbpf DZ:test5.PROC 1} +process DZ:test5 send "12345\n" assure "12345\n" -ioccmd {dbpf DZ:test5.PROC 1} +process DZ:test5 send "-12345\n" assure "mismatch\n" -ioccmd {dbpf DZ:test5.PROC 1} +process DZ:test5 send " 12345\n" assure "12345\n" -ioccmd {dbpf DZ:test5.PROC 1} +process DZ:test5 send " -12345\n" assure "mismatch\n" -ioccmd {dbpf DZ:test5.PROC 1} +process DZ:test5 send "- 12345\n" assure "mismatch\n" -ioccmd {dbpf DZ:test5.PROC 1} +process DZ:test5 send "\n" assure "mismatch\n" -ioccmd {dbpf DZ:test5.PROC 1} +process DZ:test5 send " \n" assure "mismatch\n" -ioccmd {dbpf DZ:test5.PROC 1} +process DZ:test5 send " 0x12345\n" assure "0\n" -ioccmd {dbpf DZ:test5.PROC 1} +process DZ:test5 send " 012345\n" assure "12345\n" -ioccmd {dbpf DZ:test5.PROC 1} +process DZ:test5 send "-0x12345\n" assure "mismatch\n" -ioccmd {dbpf DZ:test5.PROC 1} +process DZ:test5 send "0xffffffff\n" assure "0\n" -ioccmd {dbpf DZ:test5.PROC 1} +process DZ:test5 send "-0xffffffff\n" assure "mismatch\n" -ioccmd {dbpf DZ:test6.PROC 1} +process DZ:test6 send "12345\n" assure "1234\n" -ioccmd {dbpf DZ:test6.PROC 1} +process DZ:test6 send "-12345\n" assure "-123\n" -ioccmd {dbpf DZ:test6.PROC 1} +process DZ:test6 send " 12345\n" assure "1234\n" -ioccmd {dbpf DZ:test6.PROC 1} +process DZ:test6 send " -12345\n" assure "-123\n" -ioccmd {dbpf DZ:test6.PROC 1} +process DZ:test6 send "- 12345\n" assure "mismatch\n" -ioccmd {dbpf DZ:test6.PROC 1} +process DZ:test6 send "\n" assure "mismatch\n" -ioccmd {dbpf DZ:test6.PROC 1} +process DZ:test6 send " \n" assure "mismatch\n" -ioccmd {dbpf DZ:test6.PROC 1} +process DZ:test6 send " 0x12345\n" assure "18\n" -ioccmd {dbpf DZ:test6.PROC 1} +process DZ:test6 send " 012345\n" assure "83\n" -ioccmd {dbpf DZ:test6.PROC 1} +process DZ:test6 send "-0x12345\n" assure "-1\n" -ioccmd {dbpf DZ:test6.PROC 1} +process DZ:test6 send "0xffffffff\n" assure "255\n" -ioccmd {dbpf DZ:test6.PROC 1} +process DZ:test6 send "-0xffffffff\n" assure "-15\n" -ioccmd {dbpf DZ:test7.PROC 1} +process DZ:test7 send "12345\n" assure "1234\n" -ioccmd {dbpf DZ:test7.PROC 1} +process DZ:test7 send "-12345\n" assure "-123\n" -ioccmd {dbpf DZ:test7.PROC 1} +process DZ:test7 send " 12345\n" assure "1\n" -ioccmd {dbpf DZ:test7.PROC 1} +process DZ:test7 send " -12345\n" assure "mismatch\n" -ioccmd {dbpf DZ:test7.PROC 1} +process DZ:test7 send "- 12345\n" assure "mismatch\n" -ioccmd {dbpf DZ:test7.PROC 1} +process DZ:test7 send "\n" assure "mismatch\n" -ioccmd {dbpf DZ:test7.PROC 1} +process DZ:test7 send " \n" assure "mismatch\n" -ioccmd {dbpf DZ:test7.PROC 1} +process DZ:test7 send " 0x12345\n" assure "1\n" -ioccmd {dbpf DZ:test7.PROC 1} +process DZ:test7 send " 012345\n" assure "10\n" -ioccmd {dbpf DZ:test7.PROC 1} +process DZ:test7 send "-0x12345\n" assure "-1\n" -ioccmd {dbpf DZ:test7.PROC 1} +process DZ:test7 send "0xffffffff\n" assure "255\n" -ioccmd {dbpf DZ:test7.PROC 1} +process DZ:test7 send "-0xffffffff\n" assure "-15\n" -ioccmd {dbpf DZ:test8.PROC 1} +process DZ:test8 send "12345\n" assure "12345\n" -ioccmd {dbpf DZ:test8.PROC 1} +process DZ:test8 send "-12345\n" assure "-12345\n" -ioccmd {dbpf DZ:test8.PROC 1} +process DZ:test8 send " 12345\n" assure "12345\n" -ioccmd {dbpf DZ:test8.PROC 1} +process DZ:test8 send " -12345\n" assure "-12345\n" -ioccmd {dbpf DZ:test8.PROC 1} +process DZ:test8 send "- 12345\n" assure "-12345\n" -ioccmd {dbpf DZ:test8.PROC 1} +process DZ:test8 send "\n" assure "mismatch\n" -ioccmd {dbpf DZ:test8.PROC 1} +process DZ:test8 send " \n" assure "mismatch\n" -ioccmd {dbpf DZ:test8.PROC 1} +process DZ:test8 send " 0x12345\n" assure "74565\n" -ioccmd {dbpf DZ:test8.PROC 1} +process DZ:test8 send " 012345\n" assure "5349\n" -ioccmd {dbpf DZ:test8.PROC 1} +process DZ:test8 send "-0x12345\n" assure "-74565\n" -ioccmd {dbpf DZ:test8.PROC 1} +process DZ:test8 send "0xffffffff\n" assure "-1\n" -ioccmd {dbpf DZ:test8.PROC 1} +process DZ:test8 send "-0xffffffff\n" assure "1\n" -ioccmd {dbpf DZ:test9.PROC 1} +process DZ:test9 send "12345\n" assure "74565\n" -ioccmd {dbpf DZ:test9.PROC 1} +process DZ:test9 send "-12345\n" assure "-74565\n" -ioccmd {dbpf DZ:test9.PROC 1} +process DZ:test9 send " 12345\n" assure "74565\n" -ioccmd {dbpf DZ:test9.PROC 1} +process DZ:test9 send " -12345\n" assure "-74565\n" -ioccmd {dbpf DZ:test9.PROC 1} +process DZ:test9 send "- 12345\n" assure "mismatch\n" -ioccmd {dbpf DZ:test9.PROC 1} +process DZ:test9 send "\n" assure "mismatch\n" -ioccmd {dbpf DZ:test9.PROC 1} +process DZ:test9 send " \n" assure "mismatch\n" -ioccmd {dbpf DZ:test9.PROC 1} +process DZ:test9 send " 0x12345\n" assure "74565\n" -ioccmd {dbpf DZ:test9.PROC 1} +process DZ:test9 send " 012345\n" assure "74565\n" -ioccmd {dbpf DZ:test9.PROC 1} +process DZ:test9 send "-0x12345\n" assure "-74565\n" -ioccmd {dbpf DZ:test9.PROC 1} +process DZ:test9 send "0xffffffff\n" assure "-1\n" -ioccmd {dbpf DZ:test9.PROC 1} +process DZ:test9 send "-0xffffffff\n" assure "1\n" -ioccmd {dbpf DZ:test10.PROC 1} +process DZ:test10 send "12345\n" assure "5349\n" -ioccmd {dbpf DZ:test10.PROC 1} +process DZ:test10 send "-12345\n" assure "-5349\n" -ioccmd {dbpf DZ:test10.PROC 1} +process DZ:test10 send " 12345\n" assure "5349\n" -ioccmd {dbpf DZ:test10.PROC 1} +process DZ:test10 send " -12345\n" assure "-5349\n" -ioccmd {dbpf DZ:test10.PROC 1} +process DZ:test10 send "- 12345\n" assure "mismatch\n" -ioccmd {dbpf DZ:test10.PROC 1} +process DZ:test10 send "\n" assure "mismatch\n" -ioccmd {dbpf DZ:test10.PROC 1} +process DZ:test10 send " \n" assure "mismatch\n" -ioccmd {dbpf DZ:test10.PROC 1} +process DZ:test10 send " 0x12345\n" assure "0\n" -ioccmd {dbpf DZ:test10.PROC 1} +process DZ:test10 send " 012345\n" assure "5349\n" -ioccmd {dbpf DZ:test10.PROC 1} +process DZ:test10 send "-0x12345\n" assure "0\n" -ioccmd {dbpf DZ:test10.PROC 1} +process DZ:test10 send "0xffffffff\n" assure "0\n" -ioccmd {dbpf DZ:test10.PROC 1} +process DZ:test10 send "-0xffffffff\n" assure "0\n" diff --git a/streamApp/tests/testIoIntrPollTimeout b/streamApp/tests/testIoIntrPollTimeout index 7bf86f4..234a306 100755 --- a/streamApp/tests/testIoIntrPollTimeout +++ b/streamApp/tests/testIoIntrPollTimeout @@ -73,7 +73,7 @@ for {set i 1} {$i <= $rep} {incr i} { send "with number $i\n" after 100 } -ioccmd {dbpf "DZ:printresult.PROC" 1} +process DZ:printresult assure "Last line received: $rep\n" assure "Line count: $rep\n" assure "Error count: 0\n" diff --git a/streamApp/tests/testLongInputTerminator b/streamApp/tests/testLongInputTerminator index fa9b236..c8d0a84 100755 --- a/streamApp/tests/testLongInputTerminator +++ b/streamApp/tests/testLongInputTerminator @@ -27,17 +27,17 @@ set debug 0 startioc -ioccmd {dbpf DZ:test1.PROC 1} +process DZ:test1 assure "Give input\n" send "abc\r\r\r" assure "abc\n" -ioccmd {dbpf DZ:test1.PROC 1} +process DZ:test1 assure "Give input\n" send "klm\rxyz\r\r\r" assure "klm\rxyz\n" -ioccmd {dbpf DZ:test1.PROC 1} +process DZ:test1 assure "Give input\n" send "123\r\rxyz\r\r\r" assure "123\r\rxyz\n" diff --git a/streamApp/tests/testLongUnsolicitedInput b/streamApp/tests/testLongUnsolicitedInput index 83d720a..525f83e 100755 --- a/streamApp/tests/testLongUnsolicitedInput +++ b/streamApp/tests/testLongUnsolicitedInput @@ -65,9 +65,9 @@ for {set i 1} {$i <= $rep} {incr i} { } send $output after 2000 -ioccmd {dbpf "DZ:stringout.PROC" 1} +process DZ:stringout assure "This is line $rep.\n" -ioccmd {dbpf "DZ:countout.PROC" 1} +process DZ:countout assure "$rep\n" finish diff --git a/streamApp/tests/testMultiLineFormatString b/streamApp/tests/testMultiLineFormatString index 2837b41..0c8e91d 100755 --- a/streamApp/tests/testMultiLineFormatString +++ b/streamApp/tests/testMultiLineFormatString @@ -447,7 +447,7 @@ set debug 0 startioc -ioccmd {dbpf DZ:VP3.PROC 1} +process DZ:VP3 assure "Q" send "Q:V3=0,V5=0,V+12=0,V12=0,T1=38,T2=40,T3=43,T4=45,F1=1350,F2=1361,F3=1373,F4=1384,F5=1396,F6=1407,F7=1419,F8=1430,F9=1442,PS1=0,PS2=0,POH=23.5,MAXTMP=45,PS1=0,PS2=0,MSG=0,SW=1,SN=8765,UN=APEX1,IP=128.12\r\n" assure "0\n" diff --git a/streamApp/tests/testOutTerminators b/streamApp/tests/testOutTerminators index e54fb0a..d129a8b 100755 --- a/streamApp/tests/testOutTerminators +++ b/streamApp/tests/testOutTerminators @@ -32,9 +32,9 @@ set startup { set debug 0 startioc -ioccmd {dbpf DZ:test1 "string 1"} +put DZ:test1 "string 1" assure "string 1A\n" -ioccmd {dbpf DZ:test2 "string 2"} +put DZ:test2 "string 2" assure "string 2S\r\n" finish diff --git a/streamApp/tests/testParallelAccess b/streamApp/tests/testParallelAccess index c5983c0..6e6e393 100755 --- a/streamApp/tests/testParallelAccess +++ b/streamApp/tests/testParallelAccess @@ -32,8 +32,8 @@ set debug 0 startioc -ioccmd {dbpf DZ:slow 1} -ioccmd {dbpf DZ:fast 1} +put DZ:slow 1 +put DZ:fast 1 assure "slow start\n" assure "slow finished\n" assure "fast\n" diff --git a/streamApp/tests/testPercent b/streamApp/tests/testPercent index bf8e815..fc78c27 100755 --- a/streamApp/tests/testPercent +++ b/streamApp/tests/testPercent @@ -27,7 +27,7 @@ set debug 0 startioc -ioccmd {dbpf DZ:test1 1} +put DZ:test1 1 assure "%\0331\033\033%\n" finish diff --git a/streamApp/tests/testPerformance b/streamApp/tests/testPerformance old mode 100755 new mode 100644 index 74fce3a..a35b987 --- a/streamApp/tests/testPerformance +++ b/streamApp/tests/testPerformance @@ -33,7 +33,7 @@ set size 1 set timeout 600000 startioc - ioccmd {dbpf DZ:test1.PROC 1} + process DZ:test1 send "$message\n" assure "$size\n" @@ -42,7 +42,7 @@ for {set log 1} {$log <= 21} {incr log} { set output "$message\n" set starttime [clock clicks] send $output - ioccmd {dbpf DZ:test1.PROC 1} + process DZ:test1 assure "$size\n" set duration [expr [clock clicks] - $starttime] set performance($size) [expr $duration*1.0/$size] diff --git a/streamApp/tests/testQuotes b/streamApp/tests/testQuotes index 98b7226..6f5f010 100755 --- a/streamApp/tests/testQuotes +++ b/streamApp/tests/testQuotes @@ -31,7 +31,7 @@ set debug 0 startioc -ioccmd {dbpf DZ:test1 "X"} +put DZ:test1 "X" assure "Escaped \"double\" quotes\n" assure "Escaped 'single' quotes\n" assure "Single 'quotes' in double quotes\n" diff --git a/streamApp/tests/testRaw b/streamApp/tests/testRaw index cc087c4..fdeb5aa 100755 --- a/streamApp/tests/testRaw +++ b/streamApp/tests/testRaw @@ -60,7 +60,7 @@ set debug 0 startioc -ioccmd {dbpf DZ:test1 0} +put DZ:test1 0 assure "\x00\n" assure "\x00\n" assure "\x00\x00\n" @@ -92,7 +92,7 @@ assure "\x00\x00\x00\n" assure "\x00\x00\x00\x00\n" assure "\x00\x00\x00\x00\x00\n" -ioccmd {dbpf DZ:test1 1} +put DZ:test1 1 assure "\x01\n" assure "\x01\n" assure "\x00\x01\n" @@ -124,7 +124,7 @@ assure "\x01\x00\x00\n" assure "\x01\x00\x00\x00\n" assure "\x01\x00\x00\x00\x00\n" -ioccmd {dbpf DZ:test1 -1} +put DZ:test1 -1 assure "\xff\n" assure "\xff\n" assure "\xff\xff\n" @@ -156,7 +156,7 @@ assure "\xff\x00\x00\n" assure "\xff\x00\x00\x00\n" assure "\xff\x00\x00\x00\x00\n" -ioccmd {dbpf DZ:test1 269554195} +put DZ:test1 269554195 assure "\x13\n" assure "\x13\n" assure "\x12\x13\n" @@ -188,7 +188,7 @@ assure "\x13\x00\x00\n" assure "\x13\x00\x00\x00\n" assure "\x13\x00\x00\x00\x00\n" -ioccmd {dbpf DZ:test1 -559038737} +put DZ:test1 -559038737 assure "\xef\n" assure "\xef\n" assure "\xbe\xef\n" @@ -220,33 +220,33 @@ assure "\xef\x00\x00\n" assure "\xef\x00\x00\x00\n" assure "\xef\x00\x00\x00\x00\n" -ioccmd {dbpf DZ:test2.PROC 1} +process DZ:test2 send "\x01\x02\x03\x04" assure "01020304\n" -ioccmd {dbpf DZ:test2.PROC 1} +process DZ:test2 send "\xde\xad\xbe\xef" assure "deadbeef\n" -ioccmd {dbpf DZ:test2.PROC 1} +process DZ:test2 send "\x00\x00\x00\x00" assure "00000000\n" -ioccmd {dbpf DZ:test3.PROC 1} +process DZ:test3 send "\x04\x03\x02\x01" assure "00020304\n" -ioccmd {dbpf DZ:test3.PROC 1} +process DZ:test3 send "\xde\xad\xbe\xef" assure "ffbeadde\n" -ioccmd {dbpf DZ:test3.PROC 1} +process DZ:test3 send "\x00\x00\x00\x00" assure "00000000\n" -ioccmd {dbpf DZ:test4.PROC 1} +process DZ:test4 send "\x04\x03\x02\x01" assure "00020304\n" -ioccmd {dbpf DZ:test4.PROC 1} +process DZ:test4 send "\xde\xad\xbe\xef" assure "00beadde\n" -ioccmd {dbpf DZ:test4.PROC 1} +process DZ:test4 send "\x00\x00\x00\x00" assure "00000000\n" diff --git a/streamApp/tests/testRawFloat b/streamApp/tests/testRawFloat index c65490b..decaf1e 100755 --- a/streamApp/tests/testRawFloat +++ b/streamApp/tests/testRawFloat @@ -26,7 +26,7 @@ set debug 0 startioc -ioccmd {dbpf DZ:test1 "0"} +put DZ:test1 "0" assure "\x00\x00\x00\x00\n" assure "\x00\x00\x00\x00\n" assure "\x00\x00\x00\x00\n" @@ -34,7 +34,7 @@ assure "\x00\x00\x00\x00\n" assure "\x00\x00\x00\x00\x00\x00\x00\x00\n" assure "\x00\x00\x00\x00\x00\x00\x00\x00\n" -ioccmd {dbpf DZ:test1 "1"} +put DZ:test1 "1" assure "\x3f\x80\x00\x00\n" assure "\x00\x00\x80\x3f\n" assure "\x3f\x80\x00\x00\n" @@ -42,7 +42,7 @@ assure "\x00\x00\x80\x3f\n" assure "\x3f\xf0\x00\x00\x00\x00\x00\x00\n" assure "\x00\x00\x00\x00\x00\x00\xf0\x3f\n" -ioccmd {dbpf DZ:test1 "-1"} +put DZ:test1 "-1" assure "\xbf\x80\x00\x00\n" assure "\x00\x00\x80\xbf\n" assure "\xbf\x80\x00\x00\n" @@ -50,7 +50,7 @@ assure "\x00\x00\x80\xbf\n" assure "\xbf\xf0\x00\x00\x00\x00\x00\x00\n" assure "\x00\x00\x00\x00\x00\x00\xf0\xbf\n" -ioccmd {dbpf DZ:test1 "3.1415"} +put DZ:test1 "3.1415" assure "\x40\x49\x0e\x56\n" assure "\x56\x0e\x49\x40\n" assure "\x40\x49\x0e\x56\n" diff --git a/streamApp/tests/testSeverityAndStatus b/streamApp/tests/testSeverityAndStatus index 870b009..4b64be2 100755 --- a/streamApp/tests/testSeverityAndStatus +++ b/streamApp/tests/testSeverityAndStatus @@ -33,42 +33,42 @@ set debug 0 startioc # reply timeout -ioccmd {dbpf DZ:readTimeout.PROC 1} +process DZ:readTimeout assure "Give me input\n" after 1100 -ioccmd {dbpf DZ:echo.PROC 1} +process DZ:echo ioccmd {dbpr DZ:echo 1} assure "Text:'' SEVR=3 STAT=10\n" # read timeout -ioccmd {dbpf DZ:readTimeout.PROC 1} +process DZ:readTimeout assure "Give me input\n" send "Trulala" after 200 -ioccmd {dbpf DZ:echo.PROC 1} +process DZ:echo assure "Text:'Trulala' SEVR=3 STAT=1\n" # reply timeout again, old input stays -ioccmd {dbpf DZ:readTimeout.PROC 1} +process DZ:readTimeout assure "Give me input\n" after 1100 -ioccmd {dbpf DZ:echo.PROC 1} +process DZ:echo assure "Text:'Trulala' SEVR=3 STAT=10\n" # mismatch, partially parsed -ioccmd {dbpf DZ:readTimeout.PROC 1} +process DZ:readTimeout assure "Give me input\n" send "bla extra\n" after 200 -ioccmd {dbpf DZ:echo.PROC 1} +process DZ:echo assure "Text:'bla' SEVR=3 STAT=12\n" # success -ioccmd {dbpf DZ:readTimeout.PROC 1} +process DZ:readTimeout assure "Give me input\n" send "Input\n" after 200 -ioccmd {dbpf DZ:echo.PROC 1} +process DZ:echo assure "Text:'Input' SEVR=0 STAT=0\n" diff --git a/streamApp/tests/testSkeleton b/streamApp/tests/testSkeleton index 69ab057..0234b65 100644 --- a/streamApp/tests/testSkeleton +++ b/streamApp/tests/testSkeleton @@ -26,7 +26,7 @@ set debug 0 startioc -ioccmd {dbpf DZ:test1 "string 1"} +put DZ:test1 "string 1" assure "string 1\n" finish diff --git a/streamApp/tests/testSpyOnLongInput b/streamApp/tests/testSpyOnLongInput index 063af37..9aecbba 100755 --- a/streamApp/tests/testSpyOnLongInput +++ b/streamApp/tests/testSpyOnLongInput @@ -64,18 +64,18 @@ set rep 500 startioc -ioccmd {dbpf "DZ:request.PROC" 1} +process DZ:request assure "Give input\n" for {set i 1} {$i <= $rep} {incr i} { append output "This is line $i.\n" } send $output after 2000 -ioccmd {dbpf "DZ:echo.PROC" 1} +process DZ:echo assure "This is line 253.\n" -ioccmd {dbpf "DZ:stringout.PROC" 1} +process DZ:stringout assure "This is line $rep.\n" -ioccmd {dbpf "DZ:countout.PROC" 1} +process DZ:countout assure "$rep\n" finish diff --git a/streamApp/tests/testStrangesum b/streamApp/tests/testStrangesum index 65203e1..53723bf 100755 --- a/streamApp/tests/testStrangesum +++ b/streamApp/tests/testStrangesum @@ -27,7 +27,7 @@ set startup { set debug 0 startioc -ioccmd {dbpf DZ:test1 "010304010001"} +put DZ:test1 "010304010001" assure ":010304010001F6\r\n" finish diff --git a/streamApp/tests/testString b/streamApp/tests/testString index bd8995d..8e8bab6 100755 --- a/streamApp/tests/testString +++ b/streamApp/tests/testString @@ -52,71 +52,71 @@ set debug 0 startioc -ioccmd {dbpf DZ:test1.PROC 1} +process DZ:test1 send "foobar\n" assure "foobar|\n" -ioccmd {dbpf DZ:test1.PROC 1} +process DZ:test1 send " foobar \n" assure "foobar| \n" -ioccmd {dbpf DZ:test1.PROC 1} +process DZ:test1 send " foo bar \n" assure "foo| bar \n" -ioccmd {dbpf DZ:test1.PROC 1} +process DZ:test1 send " \n" assure "|\n" -ioccmd {dbpf DZ:test1.PROC 1} +process DZ:test1 send "ThisIsAVeryLongInputStringThatExceedsFouryCharacters right?\n" assure "ThisIsAVeryLongInputStringThatExceedsFo| right?\n" -ioccmd {dbpf DZ:test2.PROC 1} +process DZ:test2 send "foobar\n" assure "foobar|\n" -ioccmd {dbpf DZ:test2.PROC 1} +process DZ:test2 send " foobar \n" assure " foobar| \n" -ioccmd {dbpf DZ:test2.PROC 1} +process DZ:test2 send " foo bar \n" assure " foo| bar \n" -ioccmd {dbpf DZ:test2.PROC 1} +process DZ:test2 send " \n" assure " |\n" -ioccmd {dbpf DZ:test3.PROC 1} +process DZ:test3 send "foobar\n" assure "foobar|\n" -ioccmd {dbpf DZ:test3.PROC 1} +process DZ:test3 send " foobar \n" assure "foobar |\n" -ioccmd {dbpf DZ:test3.PROC 1} +process DZ:test3 send " foo bar \n" assure "foo bar |\n" -ioccmd {dbpf DZ:test3.PROC 1} +process DZ:test3 send " \n" assure "|\n" -ioccmd {dbpf DZ:test4.PROC 1} +process DZ:test4 send "foobar\n" assure "foobar|\n" -ioccmd {dbpf DZ:test4.PROC 1} +process DZ:test4 send " foobar \n" assure " foobar |\n" -ioccmd {dbpf DZ:test4.PROC 1} +process DZ:test4 send " foo bar \n" assure " foo bar |\n" -ioccmd {dbpf DZ:test4.PROC 1} +process DZ:test4 send " \n" assure " |\n" -ioccmd {dbpf DZ:test5.PROC 1} +process DZ:test5 send "foobar\n" assure "foobar|\n" -ioccmd {dbpf DZ:test5.PROC 1} +process DZ:test5 send " foobar \n" assure " foobar |\n" -ioccmd {dbpf DZ:test5.PROC 1} +process DZ:test5 send " foo bar \n" assure " foo bar |\n" -ioccmd {dbpf DZ:test5.PROC 1} +process DZ:test5 send " \n" assure " |\n" diff --git a/streamApp/tests/testTimestamp b/streamApp/tests/testTimestamp index 6e4e7a3..efef6f4 100755 --- a/streamApp/tests/testTimestamp +++ b/streamApp/tests/testTimestamp @@ -74,79 +74,79 @@ proc checkTS {pv timestamp} { startioc -ioccmd {dbpf DZ:test1 1044068706.789} +put DZ:test1 1044068706.789 assure "01.02.2003 04:05:06.79 +0100\n" -ioccmd {dbpf DZ:test1 1057025106.789} +put DZ:test1 1057025106.789 assure "01.07.2003 04:05:06.79 +0200\n" -ioccmd {dbpf DZ:test2.PROC 1} +process DZ:test2 send "2003-02-01 04:05:06\n" assure "1044068706 2003-02-01 04:05:06\n"; -ioccmd {dbpf DZ:test3.PROC 1} +process DZ:test3 send "1. February 2003 04:05:06.789 3.1415\n" assure "01.02.2003 04:05:06.79 +0100\n"; checkTS DZ:test3 "02/01/03 04:05:06.789000000" -ioccmd {dbpf DZ:test3.PROC 1} +process DZ:test3 send "1. July 2003 04:05:06.789123 3.1415\n" assure "01.07.2003 04:05:06.79 +0200\n"; checkTS DZ:test3 "07/01/03 04:05:06.789123000" -ioccmd {dbpf DZ:test4.PROC 1} +process DZ:test4 send "mon jan 2 04:05:06 2003 3.1415\n" assure "Thu 02.01.2003 04:05:06.00 +0100\n"; checkTS DZ:test4 "01/02/03 04:05:06.000000000" -ioccmd {dbpf DZ:test5.PROC 1} +process DZ:test5 send "12 a\n" assure "00\n"; -ioccmd {dbpf DZ:test5.PROC 1} +process DZ:test5 send "01 a\n" assure "01\n"; -ioccmd {dbpf DZ:test5.PROC 1} +process DZ:test5 send "2 a\n" assure "02\n"; -ioccmd {dbpf DZ:test5.PROC 1} +process DZ:test5 send "11 a\n" assure "11\n"; -ioccmd {dbpf DZ:test5.PROC 1} +process DZ:test5 send "12 p\n" assure "12\n"; -ioccmd {dbpf DZ:test5.PROC 1} +process DZ:test5 send "01 p\n" assure "13\n"; -ioccmd {dbpf DZ:test5.PROC 1} +process DZ:test5 send "11 p\n" assure "23\n"; -ioccmd {dbpf DZ:test6.PROC 1} +process DZ:test6 send "am 12\n" assure "00\n"; -ioccmd {dbpf DZ:test6.PROC 1} +process DZ:test6 send "Am 01\n" assure "01\n"; -ioccmd {dbpf DZ:test6.PROC 1} +process DZ:test6 send "aM 2\n" assure "02\n"; -ioccmd {dbpf DZ:test6.PROC 1} +process DZ:test6 send "AM 11\n" assure "11\n"; -ioccmd {dbpf DZ:test6.PROC 1} +process DZ:test6 send "p 12\n" assure "12\n"; -ioccmd {dbpf DZ:test6.PROC 1} +process DZ:test6 send "P 01\n" assure "13\n"; -ioccmd {dbpf DZ:test6.PROC 1} +process DZ:test6 send "PM 11\n" assure "23\n"; -ioccmd {dbpf DZ:test7.PROC 1} +process DZ:test7 send "1.2.2010 12:56:32 +0000\n" assure "01.02.2010 13:56:32 +0100 1265028992.000000\n"; -ioccmd {dbpf DZ:test7.PROC 1} +process DZ:test7 send "1.7.2010 12:56:32 +0000\n" assure "01.07.2010 14:56:32 +0200 1277988992.000000\n"; finish diff --git a/streamApp/tests/testWaage b/streamApp/tests/testWaage index f3443a3..58caba6 100755 --- a/streamApp/tests/testWaage +++ b/streamApp/tests/testWaage @@ -43,12 +43,12 @@ set debug 0 startioc -ioccmd {dbpf DZ:sign.PROC 1} +process DZ:sign assure "w\n" send " - 15.20 Kg\n" assure "-15.20\n" -ioccmd {dbpf DZ:sign.PROC 1} +process DZ:sign assure "w\n" send " 15.00 Kg\n" assure "15.00\n" diff --git a/streamApp/tests/testWaveform b/streamApp/tests/testWaveform index 94a1714..cafd390 100755 --- a/streamApp/tests/testWaveform +++ b/streamApp/tests/testWaveform @@ -70,53 +70,53 @@ set debug 0 startioc -ioccmd {dbpf DZ:test1.PROC 1} +process DZ:test1 send "text 1.0,2.0,3.0 end\n" assure "3 elements: 1.0,2.0,3.0\n" -ioccmd {dbpf DZ:test1.PROC 1} +process DZ:test1 send "text 3, 2, 1 end\n" assure "3 elements: 3.0,2.0,1.0\n" -ioccmd {dbpf DZ:test1.PROC 1} +process DZ:test1 send "text 7 end\n" assure "1 elements: 7.0\n" -ioccmd {dbpf DZ:test2.PROC 1} +process DZ:test2 send "text 1.0,2.0,3.0 end\n" assure "3 elements: 1.0,2.0,3.0\n" -ioccmd {dbpf DZ:test2.PROC 1} +process DZ:test2 send "text 3, 2, 1 end\n" assure "3 elements: 3.0,2.0,1.0\n" -ioccmd {dbpf DZ:test2.PROC 1} +process DZ:test2 send "text 7 end\n" assure "1 elements: 7.0\n" -ioccmd {dbpf DZ:test3.PROC 1} +process DZ:test3 send "1 2 3\n" assure "3 elements: 1 2 3\n" -ioccmd {dbpf DZ:test3.PROC 1} +process DZ:test3 send " 3 2 1 \n" assure "3 elements: 3 2 1\n" -ioccmd {dbpf DZ:test3.PROC 1} +process DZ:test3 send "12345\n" assure "2 elements: 123 45\n" -ioccmd {dbpf DZ:test4.PROC 1} +process DZ:test4 send "1 2 3\n" assure "3 elements: 1 2 3\n" -ioccmd {dbpf DZ:test4.PROC 1} +process DZ:test4 send " 3 2 1 \n" assure "3 elements: 3 2 1\n" -ioccmd {dbpf DZ:test4.PROC 1} +process DZ:test4 send "12345\n" assure "2 elements: 123 45\n" -ioccmd {dbpf DZ:test5.PROC 1} +process DZ:test5 send "1...2...3\n" assure "1 elements: 1...2...3\n" -ioccmd {dbpf DZ:test5.PROC 1} +process DZ:test5 send " 3 ... 2 ... 1\n" assure "3 elements: 3 ... 2 ... 1\n" -ioccmd {dbpf DZ:test5.PROC 1} +process DZ:test5 send " 7 \n" assure "1 elements: 7\n"