Rename files containing org and htm writer
The naming `org.go` is confusing as it's not the main class of the org package
This commit is contained in:
parent
d921a68a55
commit
5c51067b59
4 changed files with 0 additions and 0 deletions
23
org/html_writer_test.go
Normal file
23
org/html_writer_test.go
Normal file
|
@ -0,0 +1,23 @@
|
|||
package org
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestHTMLWriter(t *testing.T) {
|
||||
for _, path := range orgTestFiles() {
|
||||
expected := fileString(path[:len(path)-len(".org")] + ".html")
|
||||
reader, writer := strings.NewReader(fileString(path)), NewHTMLWriter()
|
||||
actual, err := NewDocument().Silent().SetPath(path).Parse(reader).Write(writer)
|
||||
if err != nil {
|
||||
t.Errorf("%s\n got error: %s", path, err)
|
||||
continue
|
||||
}
|
||||
if actual != expected {
|
||||
t.Errorf("%s:\n%s'", path, diff(actual, expected))
|
||||
} else {
|
||||
t.Logf("%s: passed!", path)
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue