aboutsummaryrefslogtreecommitdiffhomepage
path: root/nuldoc-src/xml_test.ts
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2023-03-20 21:20:42 +0900
committernsfisis <nsfisis@gmail.com>2023-03-20 21:20:42 +0900
commit8ea45e27306d0369f2b2d624a174bd95e7f17395 (patch)
tree3eb6707863ba9bb8a80590208fb58e932d489633 /nuldoc-src/xml_test.ts
parentb0cb51367d8c68eabafaa57c2967587007aa79bd (diff)
downloadblog.nsfisis.dev-8ea45e27306d0369f2b2d624a174bd95e7f17395.tar.gz
blog.nsfisis.dev-8ea45e27306d0369f2b2d624a174bd95e7f17395.tar.zst
blog.nsfisis.dev-8ea45e27306d0369f2b2d624a174bd95e7f17395.zip
feat(nuldoc): add small test to xml.ts
Diffstat (limited to 'nuldoc-src/xml_test.ts')
-rw-r--r--nuldoc-src/xml_test.ts17
1 files changed, 17 insertions, 0 deletions
diff --git a/nuldoc-src/xml_test.ts b/nuldoc-src/xml_test.ts
new file mode 100644
index 0000000..28e1597
--- /dev/null
+++ b/nuldoc-src/xml_test.ts
@@ -0,0 +1,17 @@
+import { assertEquals } from "std/testing/asserts.ts";
+import { parseXmlString } from "./xml.ts";
+
+Deno.test("Parse XML", () => {
+ assertEquals(
+ "__root__",
+ parseXmlString(
+ `<?xml version="1.0" encoding="UTF-8"?>
+<hoge>
+ <piyo>
+ <!-- comment -->
+ </piyo>
+</hoge>
+`,
+ ).name,
+ );
+});