git-svn-id: trunk@11065 -
This commit is contained in:
florian 2008-05-23 21:23:10 +00:00
parent 29ba36e70b
commit 216e468cd9
2 changed files with 32 additions and 0 deletions

1
.gitattributes vendored
View File

@ -7385,6 +7385,7 @@ tests/test/opt/tretopt.pp svneol=native#text/plain
tests/test/opt/tspace.pp svneol=native#text/plain
tests/test/packages/fcl-registry/tregistry1.pp svneol=native#text/plain
tests/test/packages/hash/tmdtest.pp svneol=native#text/plain
tests/test/packages/webtbs/tw10045.pp svneol=native#text/plain
tests/test/packages/webtbs/tw1808.pp svneol=native#text/plain
tests/test/packages/webtbs/tw3820.pp svneol=native#text/plain
tests/test/packages/win-base/tdispvar1.pp svneol=native#text/plain

View File

@ -0,0 +1,31 @@
uses regexpr;
var
engine : tRegexprEngine;
source, dest : ansistring;
count : longint;
begin
if not GenerateRegExprEngine( 'foo', [], engine) then
begin
writeln( 'Failed to generate regex. engine.' );
halt(1)
end;
source := 'foo bur a';
count := RegExprReplaceAll(engine, source, '@', dest);
if (count<>1) or (dest<>'@ bur a') then
halt(1);
source := 'xfoo bur a';
count := RegExprReplaceAll(engine, source, '@', dest);
if (count<>1) or (dest<>'x@ bur a') then
halt(1);
source := 'foo bur a';
count := RegExprReplaceAll(engine, source, '@', dest);
if (count<>1) or (dest<>'@ bur a') then
halt(1);
DestroyRegExprEngine( engine );
writeln('ok');
end.