summaryrefslogtreecommitdiffstats
path: root/kate/tests/highlight.pl
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commitce4a32fe52ef09d8f5ff1dd22c001110902b60a2 (patch)
tree5ac38a06f3dde268dc7927dc155896926aaf7012 /kate/tests/highlight.pl
downloadtdelibs-ce4a32fe52ef09d8f5ff1dd22c001110902b60a2.tar.gz
tdelibs-ce4a32fe52ef09d8f5ff1dd22c001110902b60a2.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kate/tests/highlight.pl')
-rw-r--r--kate/tests/highlight.pl44
1 files changed, 44 insertions, 0 deletions
diff --git a/kate/tests/highlight.pl b/kate/tests/highlight.pl
new file mode 100644
index 000000000..991d1fea6
--- /dev/null
+++ b/kate/tests/highlight.pl
@@ -0,0 +1,44 @@
+#!/usr/bin/perl -w
+# This is a pseudo Perl file to test Kate's Perl syntax highlighting.
+# TODO: this is incomplete, add more syntax examples!
+
+sub prg($)
+{
+ my $var = shift;
+
+ $var =~ s/bla/foo/igs;
+ $var =~ s!bla!foo!igs;
+ $var =~ s#bla#foo#igs;
+ $var =~ tr/a-z/A-Z/;
+ ($match) = ($var =~ m/(.*?)/igs);
+
+ $test = 2/453453.21;
+ $test /= 2;
+
+ print qq~d fsd fsdf sdfl sd~
+
+ $" = '/';
+
+ $foo = <<__EOF;
+d ahfdklf klsdfl sdf sd
+fsd sdf sdfsdlkf sd
+__EOF
+
+ $x = "dasds";
+
+ next if( $match eq "two" );
+ next if( $match =~ /go/i );
+
+ @array = (1,2,3); # a comment
+ @array = qw(apple foo bar);
+ push(@array, 4);
+ %hash = (red => 'rot',
+ blue => 'blau');
+ print keys(%hash);
+}
+
+sub blah {
+}
+
+&blah;
+prg("test");