add launcher

This commit is contained in:
2026-09-17 15:10:46 +08:00
parent 1962d3f8a7
commit a2b0bba05f
10 changed files with 778 additions and 3 deletions

28
launcher/start_test.go Normal file
View 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)
}
}