mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-15 13:02:19 +00:00
[HUDSON-5941] [HUDSON-5944] MarkupText.toString(boolean) was ignoring the
preEscape parameter when no markup tags were added. git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@28737 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
eb6ddf8c90
commit
f043975fc8
2 files changed
+10
-3
No files matched your search
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* The MIT License
|
||||
*
|
||||
* Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi
|
||||
* Copyright (c) 2004-2010, Sun Microsystems, Inc., Kohsuke Kawaguchi
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -94,5 +94,12 @@ public class MarkupTextTest extends TestCase {
|
||||
assertEquals("&<foo>& &",text.toString(false));
|
||||
}
|
||||
|
||||
public void testPreEscape() {
|
||||
MarkupText text = new MarkupText("Line\n2 & 3\n<End>\n");
|
||||
assertEquals("Line\n2 & 3\n<End>\n", text.toString(true));
|
||||
text.addMarkup(4, "<hr/>");
|
||||
assertEquals("Line<hr/>\n2 & 3\n<End>\n", text.toString(true));
|
||||
}
|
||||
|
||||
private static final Pattern pattern = Pattern.compile("issue #([0-9]+)");
|
||||
}
|
||||
Reference in new issue
Block a user