add launcher
This commit is contained in:
28
launcher/start_test.go
Normal file
28
launcher/start_test.go
Normal file
@@ -0,0 +1,28 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestNormalizeJSONEmptyValues(t *testing.T) {
|
||||
input := map[string]any{
|
||||
"json_null": nil,
|
||||
"nil_text": "nil",
|
||||
"null_text": " NULL ",
|
||||
"normal": "connected",
|
||||
"nested": []any{nil, "NIL", 1.0},
|
||||
}
|
||||
want := map[string]any{
|
||||
"json_null": "",
|
||||
"nil_text": "",
|
||||
"null_text": "",
|
||||
"normal": "connected",
|
||||
"nested": []any{"", "", 1.0},
|
||||
}
|
||||
|
||||
got := normalizeJSONEmptyValues(input)
|
||||
if !reflect.DeepEqual(got, want) {
|
||||
t.Fatalf("normalizeJSONEmptyValues() = %#v, want %#v", got, want)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user