chore:remove folder
This commit is contained in:
@@ -1,4 +1,21 @@
|
||||
#stdout
|
||||
=== Test GenDylibPaths ===
|
||||
Test case: Lua library
|
||||
Input: -L/opt/homebrew/lib -llua -lm
|
||||
Output: [/opt/homebrew/lib/liblua.dylib /opt/homebrew/lib/libm.dylib]
|
||||
|
||||
Test case: SQLite library
|
||||
Input: -L/opt/homebrew/opt/sqlite/lib -lsqlite3
|
||||
Output: [/opt/homebrew/opt/sqlite/lib/libsqlite3.dylib]
|
||||
|
||||
Test case: INIReader library
|
||||
Input: -L/opt/homebrew/Cellar/inih/58/lib -lINIReader
|
||||
Output: [/opt/homebrew/Cellar/inih/58/lib/libINIReader.dylib]
|
||||
|
||||
Test case: No valid library
|
||||
Input: -L/opt/homebrew/lib
|
||||
Error: failed to parse pkg-config output: -L/opt/homebrew/lib
|
||||
|
||||
=== Test GetCommonSymbols ===
|
||||
|
||||
Test Case: Lua symbols
|
||||
|
||||
@@ -12,10 +12,50 @@ import (
|
||||
)
|
||||
|
||||
func main() {
|
||||
TestGenDylibPaths()
|
||||
TestGetCommonSymbols()
|
||||
TestReadExistingSymbolTable()
|
||||
TestGenSymbolTableData()
|
||||
}
|
||||
func TestGenDylibPaths() {
|
||||
fmt.Println("=== Test GenDylibPaths ===")
|
||||
|
||||
testCases := []struct {
|
||||
name string
|
||||
input string
|
||||
}{
|
||||
{
|
||||
name: "Lua library",
|
||||
input: "-L/opt/homebrew/lib -llua -lm",
|
||||
},
|
||||
{
|
||||
name: "SQLite library",
|
||||
input: "-L/opt/homebrew/opt/sqlite/lib -lsqlite3",
|
||||
},
|
||||
{
|
||||
name: "INIReader library",
|
||||
input: "-L/opt/homebrew/Cellar/inih/58/lib -lINIReader",
|
||||
},
|
||||
{
|
||||
name: "No valid library",
|
||||
input: "-L/opt/homebrew/lib",
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
fmt.Printf("Test case: %s\n", tc.name)
|
||||
fmt.Printf("Input: %s\n", tc.input)
|
||||
|
||||
result, err := symbol.GenDylibPaths(tc.input)
|
||||
|
||||
if err != nil {
|
||||
fmt.Printf("Error: %v\n", err)
|
||||
} else {
|
||||
fmt.Printf("Output: %v\n", result)
|
||||
}
|
||||
fmt.Println()
|
||||
}
|
||||
}
|
||||
func TestGetCommonSymbols() {
|
||||
fmt.Println("=== Test GetCommonSymbols ===")
|
||||
testCases := []struct {
|
||||
@@ -67,7 +107,6 @@ func TestGetCommonSymbols() {
|
||||
}
|
||||
fmt.Println()
|
||||
}
|
||||
|
||||
func TestReadExistingSymbolTable() {
|
||||
fmt.Println("=== Test ReadExistingSymbolTable ===")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user