Merge pull request '[agent/codex:gpt-5.4-mini] Read ~/spec/code/core/go/cli/RFC.md fully. Find features des...' (#93) from agent/read---spec-code-core-go-cli-rfc-md-full into dev
All checks were successful
Security Scan / security (push) Successful in 20s

This commit is contained in:
Virgil 2026-04-02 13:20:28 +00:00
commit d65aebd298
2 changed files with 19 additions and 1 deletions

View file

@ -132,7 +132,7 @@ func Label(word, value string) {
// Scanln reads from stdin.
func Scanln(a ...any) (int, error) {
return fmt.Scanln(a...)
return fmt.Fscanln(newReader(), a...)
}
// Task prints a task header: "[label] message"

View file

@ -141,3 +141,21 @@ func TestSection_GlyphTheme(t *testing.T) {
t.Fatalf("expected glyph theme to avoid unicode dashes, got %q", out)
}
}
func TestScanln_UsesOverrideStdin(t *testing.T) {
SetStdin(strings.NewReader("hello\n"))
defer SetStdin(nil)
var got string
n, err := Scanln(&got)
if err != nil {
t.Fatalf("Scanln returned error: %v", err)
}
if n != 1 {
t.Fatalf("expected 1 scanned item, got %d", n)
}
if got != "hello" {
t.Fatalf("expected %q, got %q", "hello", got)
}
}