generated from stscoundrel/go-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main_test.go
44 lines (33 loc) · 979 Bytes
/
main_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package main
import (
"errors"
"fmt"
"os"
"testing"
)
func TestCreatesJsonBuild(t *testing.T) {
ToJson()
_, err1 := os.Stat("./build/kven-norwegian.json")
_, err2 := os.Stat("./build/norwegian-kven.json")
fmt.Println(err1)
fmt.Println(err2)
if errors.Is(err1, os.ErrNotExist) {
t.Error("JSON output file not found in build directory for Kven - Norwegian dictionary")
}
if errors.Is(err2, os.ErrNotExist) {
t.Error("JSON output file not found in build directory for Norwegian - Kven dictionary")
}
}
func TestCreatesDSLBuild(t *testing.T) {
ToDsl()
_, err1 := os.Stat("./build/kven-norwegian.dsl")
_, err2 := os.Stat("./build/norwegian-kven.dsl")
fmt.Println(err1)
fmt.Println(err2)
if errors.Is(err1, os.ErrNotExist) {
t.Error("DSL output file not found in build directory for Kven - Norwegian dictionary")
}
if errors.Is(err2, os.ErrNotExist) {
t.Error("DSL output file not found in build directory for Norwegian - Kven dictionary")
}
}