From 586abd208221761a6c93bc4568513e9cd4dc287d Mon Sep 17 00:00:00 2001 From: kanreki <32443233+kanreki@users.noreply.github.com> Date: Tue, 14 Sep 2021 12:15:53 -0700 Subject: Use correct int return type for stream input operations This makes it safe to compare results to -1 to indicate EOF, regardless of whether char is considered signed or unsigned; and so eliminates compiler warnings on platforms such as ARM. Fixes bug #2058. --- test/regress/2058_1.test | 8 ++++++++ test/regress/2058_2.test | 11 +++++++++++ 2 files changed, 19 insertions(+) create mode 100644 test/regress/2058_1.test create mode 100644 test/regress/2058_2.test (limited to 'test') diff --git a/test/regress/2058_1.test b/test/regress/2058_1.test new file mode 100644 index 00000000..06043007 --- /dev/null +++ b/test/regress/2058_1.test @@ -0,0 +1,8 @@ +2021/1/2 Test + A $1.00 + B + +test -p 'last %^@' bal -> 1 +__ERROR__ +Error: Invalid char '%' +end test diff --git a/test/regress/2058_2.test b/test/regress/2058_2.test new file mode 100644 index 00000000..3c6c2a7e --- /dev/null +++ b/test/regress/2058_2.test @@ -0,0 +1,11 @@ +2021/1/2 Test + A $1.00 + B + +test --limit 'date>=[2020/12/31' register A -> 1 +__ERROR__ +While parsing value expression: + (date>=[2020/12/31)&((account =~ /A/)) + +Error: Missing ']' +end test -- cgit v1.2.3