chore: import upstream snapshot with attribution
CI / benchmark (push) Has been skipped
install-script / posix-syntax (push) Successful in 6m1s
CI / build-onnx (push) Failing after 6m43s
init-smoke / dry-run (push) Failing after 15m57s
security / govulncheck (push) Has been cancelled
security / trivy-fs (push) Has been cancelled
CI / test (1.26, ubuntu-latest) (push) Has been cancelled
Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled
CI / test (1.26, macos-latest) (push) Has been cancelled
CI / build-windows (push) Has been cancelled
CI / lint (push) Has been cancelled
install-script / powershell-syntax (push) Has been cancelled
install-script / install (macos-14) (push) Has been cancelled
install-script / install (ubuntu-latest) (push) Has been cancelled

This commit is contained in:
wehub-resource-sync
2026-07-13 12:33:42 +08:00
commit a06f331eb8
3186 changed files with 689843 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
package main
import "testing"
// TestNodeCmdBuildsArgs covers the get_symbol_source argument shaping the node
// verb performs, including omission of an empty format.
func TestNodeCmdBuildsArgs(t *testing.T) {
args := buildNodeArgs("internal/p.go::Parse", "json", 5)
if args["id"] != "internal/p.go::Parse" {
t.Errorf("id = %v", args["id"])
}
if args["format"] != "json" {
t.Errorf("format = %v", args["format"])
}
if args["context_lines"] != 5 {
t.Errorf("context_lines = %v", args["context_lines"])
}
bare := buildNodeArgs("x::Y", "", 3)
if _, ok := bare["format"]; ok {
t.Error("an empty format must be omitted")
}
if bare["context_lines"] != 3 {
t.Errorf("context_lines = %v, want 3", bare["context_lines"])
}
}