Permalink
Browse files

Added test for XML namespaces

  • Loading branch information...
1 parent ed9e99b commit e8b2910ec30a6e5dba1edb0698fe66ed08007db4 @tautologistics committed May 24, 2010
Showing with 36 additions and 0 deletions.
  1. +1 −0 runtests.html
  2. +1 −0 runtests.min.html
  3. +34 −0 tests/17-xml_namespace.js
View
@@ -38,6 +38,7 @@
<script language="JavaScript" src="tests/14-comment_in_text_in_script.js"></script>
<script language="JavaScript" src="tests/15-non-verbose.js"></script>
<script language="JavaScript" src="tests/16-ignore_whitespace.js"></script>
+ <script language="JavaScript" src="tests/17-xml_namespace.js"></script>
<!-- //TODO: dynamic loading of test files -->
</head>
<body style="font-size: small; font-family:Arial, Helvetica, sans-serif;">
View
@@ -38,6 +38,7 @@
<script language="JavaScript" src="tests/14-comment_in_text_in_script.js"></script>
<script language="JavaScript" src="tests/15-non-verbose.js"></script>
<script language="JavaScript" src="tests/16-ignore_whitespace.js"></script>
+ <script language="JavaScript" src="tests/17-xml_namespace.js"></script>
<!-- //TODO: dynamic loading of test files -->
</head>
<body style="font-size: small; font-family:Arial, Helvetica, sans-serif;">
View
@@ -0,0 +1,34 @@
+(function () {
+
+function RunningInNode () {
+ return(
+ (typeof require) == "function"
+ &&
+ (typeof exports) == "object"
+ &&
+ (typeof module) == "object"
+ &&
+ (typeof __filename) == "string"
+ &&
+ (typeof __dirname) == "string"
+ );
+}
+
+if (!RunningInNode()) {
+ if (!this.Tautologistics)
+ this.Tautologistics = {};
+ if (!this.Tautologistics.NodeHtmlParser)
+ this.Tautologistics.NodeHtmlParser = {};
+ if (!this.Tautologistics.NodeHtmlParser.Tests)
+ this.Tautologistics.NodeHtmlParser.Tests = [];
+ exports = {};
+ this.Tautologistics.NodeHtmlParser.Tests.push(exports);
+}
+
+exports.name = "XML Namespace";
+exports.html = "<ns:tag>text</ns:tag>";
+exports.expected =
+ [ { raw: 'ns:tag', data: 'ns:tag', type: 'tag', name: 'ns:tag', children: [ { raw: 'text', data: 'text', type: 'text' } ] }
+ ];
+
+})();

0 comments on commit e8b2910

Please sign in to comment.