From 82d6688da2b207c4c10de005ead07caeedcff6e4 Mon Sep 17 00:00:00 2001 From: lauk Date: Fri, 13 Sep 2024 09:51:46 +0800 Subject: [PATCH] add assets generate test file --- data/assets_generate_test.go | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 data/assets_generate_test.go diff --git a/data/assets_generate_test.go b/data/assets_generate_test.go new file mode 100644 index 0000000..8c4b70e --- /dev/null +++ b/data/assets_generate_test.go @@ -0,0 +1,36 @@ +//go:build tools +// +build tools + +/* +Copyright 2024 KylinSoft Co., Ltd. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package main + +import ( + "os/exec" + "testing" +) + +// TestMainFunction tests the main function for correct file generation +func TestMainFunction(t *testing.T) { + cmd := exec.Command("go", "run", "assets_generate.go") + + // Run the command + err := cmd.Run() + if err != nil { + t.Logf("Failed to run cmd: %v", err) + } +} -- Gitee