aboutsummaryrefslogtreecommitdiffstats
path: root/unxhtmlify_test.go
diff options
context:
space:
mode:
authorTeddy Wing2014-11-13 04:46:55 -0500
committerTeddy Wing2014-11-13 04:46:55 -0500
commit7c6d29d9558d1aee3dc4e9258523362532302287 (patch)
tree548407cfece114f3ce7e07b9b6698b8565addda6 /unxhtmlify_test.go
parenta5e49ca0ba59da7ae9ea304c9c44f4ae0f325444 (diff)
downloadunXHTMLify-7c6d29d9558d1aee3dc4e9258523362532302287.tar.bz2
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 <br /> element.
Diffstat (limited to 'unxhtmlify_test.go')
-rw-r--r--unxhtmlify_test.go18
1 files changed, 18 insertions, 0 deletions
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
+ }{
+ { "<br />", "<br>" },
+ }
+
+ 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)
+ }
+ }
+}