Move everything back to root dir
This commit is contained in:
parent
1fee75a927
commit
1fa8351d11
19 changed files with 257 additions and 300 deletions
27
html_test.go
Normal file
27
html_test.go
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
// Displays error messages if there are any parse errors
|
||||
func TestErrorMessages(t *testing.T) {
|
||||
// Initialize test data
|
||||
parseResult := []ParseResult{
|
||||
{IsError: true, Msg: "Error 1"},
|
||||
{IsError: true, Msg: "Error 2"},
|
||||
}
|
||||
|
||||
h := HTMLData{
|
||||
ParseResult: parseResult,
|
||||
}
|
||||
|
||||
// Invoke function under test
|
||||
result := FullHTML(h)
|
||||
|
||||
// Assert that the result contains the error messages
|
||||
if !strings.Contains(result, "Error 1") || !strings.Contains(result, "Error 2") {
|
||||
t.Errorf("Expected error messages, but got: %s", result)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue