Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(172)

Unified Diff: tests/utils/src/MarkdownTest.dart

Issue 10153004: Add a basic YAML processor. Much of the language is still unimplemented. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: In-person code review change Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/utils/src/YamlTest.dart » ('j') | tests/utils/utils.status » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/utils/src/MarkdownTest.dart
diff --git a/tests/utils/src/MarkdownTest.dart b/tests/utils/src/MarkdownTest.dart
index f3071f5ecc5dba181389aafe953d1045058ee58b..8ecc70fe62107a8fb05a4792acbb5ed26d390c4e 100644
--- a/tests/utils/src/MarkdownTest.dart
+++ b/tests/utils/src/MarkdownTest.dart
@@ -9,6 +9,7 @@
// TODO(rnystrom): Better path to unittest.
#import('../../../lib/unittest/unittest.dart');
+#import('test_utils.dart');
/// Most of these tests are based on observing how showdown behaves:
/// http://softwaremaniacs.org/playground/showdown-highlight/
@@ -764,30 +765,6 @@ validate(String description, String markdown, String html) {
});
}
-/// The tests uses triple-quoted strings, which will include leading indentation
-/// to make them look nice in code. But we don't want the markdown parser to
-/// actually see that, so this cleans it all up.
-///
-/// Note that this is very sensitive to how the literals are styled. They should
-/// be:
-/// '''
-/// Text starts on own line. Lines up with subsequent lines.
-/// Lines are indented exactly 8 characters from the left margin.
-/// Close is on the same line.'''
-///
-cleanUpLiteral(String text) {
- var lines = text.split('\n');
- for (var j = 0; j < lines.length; j++) {
- if (lines[j].length > 8) {
- lines[j] = lines[j].substring(8, lines[j].length);
- } else {
- lines[j] = '';
- }
- }
-
- return Strings.join(lines, '\n');
-}
-
/// Does a loose comparison of the two strings of HTML. Ignores differences in
/// newlines and indentation.
compareOutput(String a, String b) {
« no previous file with comments | « no previous file | tests/utils/src/YamlTest.dart » ('j') | tests/utils/utils.status » ('J')

Powered by Google App Engine
This is Rietveld 408576698