Index: UnitTestContrib/test/unit/Fn_INCLUDE.pm
===================================================================
--- UnitTestContrib/test/unit/Fn_INCLUDE.pm (revision 14002)
+++ UnitTestContrib/test/unit/Fn_INCLUDE.pm (working copy)
@@ -190,10 +190,10 @@
$text =
$this->{test_topicObject}
- ->expandMacros('%INCLUDE{"I can\'t beleive its not butter"}%');
+ ->expandMacros('%INCLUDE{"I can\'t believe its not butter"}%');
$this->assert_str_equals(
"
- Warning: Can't INCLUDE 'I can't beleive its not butter', path is empty or contains illegal characters.
+ Warning: Can't INCLUDE 'I can't believe its not butter', path is empty or contains illegal characters.
", $text
);
}
@@ -320,4 +320,89 @@
$this->assert_str_equals( $expected, $text );
}
+sub test_hassleFreeHoff {
+ my $this = shift;
+
+ # Create topic to include
+ my $includedTopic = "TopicToInclude";
+ my ($inkyDink) =
+ Foswiki::Func::readTopic( $this->{test_web}, $includedTopic );
+ $inkyDink->text( <H6
+H5
+H4
+H3
+H2
+H1
+
+---+ H1
+
+---+ H1
+INCLUDE
+ $inkyDink->save();
+
+ my ($topicObject) =
+ Foswiki::Func::readTopic( $this->{test_web}, $this->{test_topic} );
+ my $text = $topicObject->expandMacros(<renderTML($text);
+ $text =~ s///g;
+ my $expect = < H1
+ H2
+ H3
+ H4
+ H5
+ H6
+ H6
+ H5
+ H4
+ H3
+H2
+ H1
+ H1
+ H1
+
+ H1
+ H2
+ H3
+ H4
+ H5
+ H6
+ H6
+ H5
+ H4
+ H3
+H2
+ H1
+ H1
+ H1
+
+ H1
+ H2
+ H3
+ H4
+ H5
+ H6
+ H6
+ H5
+ H4
+ H3
+H2
+ H1
+ H1
+ H1
+EXPECT
+ $this->assert_html_equals( $expect, $text );
+}
+
1;