Permalink
Browse files

Merge pull request #57 from ligne/package_block

tests for package declaration highlighting.
  • Loading branch information...
petdance committed Oct 17, 2011
2 parents 14eb75d + 5ef2e96 commit ce7062e1359e2d3c9f2ccabf93042fba31ecaace
Showing with 50 additions and 0 deletions.
  1. +19 −0 t_source/perl/package.t
  2. +31 −0 t_source/perl/package.t.html
View
@@ -0,0 +1,19 @@
+package Testing::Only;
+
+my $variable;
+
+
+package Testing::WithVersion 1.2;
+
+package My::Class {
+ our $task = "testing";
+}
+
+package My::OtherClass 1.0 {
+ sub activate {
+ say "activated";
+ }
+}
+
+package main;
+# back where we started.
@@ -0,0 +1,31 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+ <head>
+ <title>[untitled]</title>
+ <link rel="stylesheet" type="text/css" href="../../t/vim_syntax.css" />
+ </head>
+ <body>
+
+<pre><span class="synStatement">package</span><span class="synType"> Testing::Only</span>;
+
+<span class="synStatement">my</span> <span class="synIdentifier">$variable</span>;
+
+
+<span class="synStatement">package</span><span class="synType"> Testing::WithVersion</span> <span class="synFloat">1.2</span>;
+
+<span class="synStatement">package</span><span class="synType"> My::Class</span> {
+ <span class="synStatement">our</span> <span class="synIdentifier">$task</span> = <span class="synString">&quot;testing&quot;</span>;
+}
+
+<span class="synStatement">package</span><span class="synType"> My::OtherClass</span> <span class="synFloat">1.0</span> {
+ <span class="synKeyword">sub </span><span class="synFunction">activate </span>{
+ <span class="synStatement">say</span> <span class="synString">&quot;activated&quot;</span>;
+ }
+}
+
+<span class="synStatement">package</span><span class="synType"> main</span>;
+<span class="synComment"># back where we started.</span>
+</pre>
+
+ </body>
+</html>

0 comments on commit ce7062e

Please sign in to comment.