From a43e91a50a8918942acfe17328c07055c03f4384 Mon Sep 17 00:00:00 2001 From: mattias Date: Tue, 1 Feb 2011 19:15:36 +0000 Subject: [PATCH] test: added codetools tests for FindLineEndOrCodeInFrontOfPosition git-svn-id: trunk@29295 - --- test/codetoolstests/testbasiccodetools.pas | 11 ++++++++++- test/runtests.lpi | 1 - 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/test/codetoolstests/testbasiccodetools.pas b/test/codetoolstests/testbasiccodetools.pas index 29243f321f..8c7a7aae9e 100644 --- a/test/codetoolstests/testbasiccodetools.pas +++ b/test/codetoolstests/testbasiccodetools.pas @@ -49,9 +49,18 @@ procedure TTestBasicCodeTools.TestFindLineEndOrCodeInFrontOfPosition; AssertEquals('['+dbgstr(OrigSrc)+']',Expected,Actual); end; +var + e: String; begin writeln('TTestBasicCodeTools.TestFindLineEndOrCodeInFrontOfPosition '); - t(' $'#10'|a:=1;'); + e:=#13#10; // use windows line endings, they are more complicated + t(' $'+e+'|a:=1;'); + t('a$'+e+'// comment'+e+' { comment } '+e+'|'); + t('$'+e+' (* *)'+e+' |a:=1'); + t('a:=1;(* comment of first line'+e+' *)$ |b:=1'); + t('a:=1; // comment$'+e+'|b:=1'); + t('a:=1; (* comment'+e+' *) $'+e+'|b:=1'); + t('a:=1; (* comment'+e+' *) { comment'+e+' } $'+e+'|b:=1'); end; initialization diff --git a/test/runtests.lpi b/test/runtests.lpi index 76dfdd1333..fec2a3b802 100644 --- a/test/runtests.lpi +++ b/test/runtests.lpi @@ -110,7 +110,6 @@ -