From d27c3b4b7922dae901d42653b1a6b1859b72b04c Mon Sep 17 00:00:00 2001 From: florian Date: Wed, 13 Jul 2022 22:53:26 +0200 Subject: [PATCH] + test for #33559 --- tests/webtbs/tw33559.pp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 tests/webtbs/tw33559.pp diff --git a/tests/webtbs/tw33559.pp b/tests/webtbs/tw33559.pp new file mode 100644 index 0000000000..8442e3c06b --- /dev/null +++ b/tests/webtbs/tw33559.pp @@ -0,0 +1,18 @@ +{$mode delphi} +program Project1; +{$APPTYPE CONSOLE} +uses SysUtils, StrUtils; +const + FullStr = '123'#0'45'; + TestStr = '123'#0'!'; +begin + Writeln('StartsWith=', FullStr.StartsWith(TestStr)); + if FullStr.StartsWith(TestStr) then + halt(1); + Writeln('Pos=', Pos(TestStr, FullStr) > 0); + if Pos(TestStr, FullStr) > 0 then + halt(1); + Writeln('StartsText=', StartsText(TestStr, FullStr)); + if StartsText(TestStr, FullStr) then + halt(1); +end.