From e3be059d4da38aa36f1aee1d56f8ceb943d92f1c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 14 Apr 2024 22:34:44 +0200 Subject: Adding upstream version 2:4.0.4. Signed-off-by: Daniel Baumann --- testsuite/lib.test/strutils.exp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 testsuite/lib.test/strutils.exp (limited to 'testsuite/lib.test/strutils.exp') diff --git a/testsuite/lib.test/strutils.exp b/testsuite/lib.test/strutils.exp new file mode 100644 index 0000000..72d1fcd --- /dev/null +++ b/testsuite/lib.test/strutils.exp @@ -0,0 +1,25 @@ +# +# Testsuite for lib/strutils program +# + +set teststr "${topdir}src/tests/test_strutils" + +set test "without argument" +spawn $teststr +expect_pass "$test" "test_strutils: no arguments" + +set test "test long" +spawn $teststr 1 +expect_pass "$test" "1" + +set test "test long fail" +spawn $teststr fail +expect_pass "$test" "test_strutils: strtol_or_err: \'fail\'" + +set test "test double" +spawn $teststr dummy 1.1 +expect_pass "$test" "1.100000" + +set test "test double fail" +spawn $teststr dummy fail +expect_pass "$test" "test_strutils: strtod_or_err: \'fail\'" -- cgit v1.2.3