Permalink
Browse files

MDL-24060 text_to_html tests. Make sure alt text for LaTeX images doe…

…sn't break.
  • Loading branch information...
1 parent 07cd46d commit 6cc09234be017ff0b570c6b1898bb8cf151dbe87 @timhunt timhunt committed with stronk7 Dec 16, 2010
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/simpletest/testweblib.php
@@ -123,6 +123,10 @@ public function test_html_to_text_image() {
$this->assertEqual('[edit]', html_to_text('<img src="edit.png" alt="edit" />'));
}
+ public function test_html_to_text_image_with_backslash() {
+ $this->assertEqual('[\edit]', html_to_text('<img src="edit.png" alt="\edit" />'));
+ }
+
public function test_html_to_text_nowrap() {
$long = "Here is a long string, more than 75 characters long, since by default html_to_text wraps text at 75 chars.";
$this->assertEqual($long, html_to_text($long, 0));

0 comments on commit 6cc0923

Please sign in to comment.