From 7c6d29d9558d1aee3dc4e9258523362532302287 Mon Sep 17 00:00:00 2001
From: Teddy Wing
Date: Thu, 13 Nov 2014 04:46:55 -0500
Subject: Add `unxhtmlify_line` function & basic test
Create a function stub that will remove the slash from self-closing HTML
tags. Add a basic test that for now just tests the
element.
---
unxhtmlify.go | 4 ++++
unxhtmlify_test.go | 18 ++++++++++++++++++
2 files changed, 22 insertions(+)
create mode 100644 unxhtmlify_test.go
diff --git a/unxhtmlify.go b/unxhtmlify.go
index cf1ed90..97c29d7 100644
--- a/unxhtmlify.go
+++ b/unxhtmlify.go
@@ -15,3 +15,7 @@ func main() {
fmt.Fprintf(os.Stderr, "reading standard input", err)
}
}
+
+func unxhtmlify_line(s string) string {
+ return s
+}
diff --git a/unxhtmlify_test.go b/unxhtmlify_test.go
new file mode 100644
index 0000000..ac6ab38
--- /dev/null
+++ b/unxhtmlify_test.go
@@ -0,0 +1,18 @@
+package main
+
+import "testing"
+
+func TestUnxhtmlifyLine(t *testing.T) {
+ var tests = []struct {
+ input, expected string
+ }{
+ { "
", "
" },
+ }
+
+ for _, c := range tests {
+ result := unxhtmlify_line(c.input)
+ if result != c.expected {
+ t.Errorf("unminify_line(%q) == %q, want %q", c.input, result, c.expected)
+ }
+ }
+}
--
cgit v1.2.3