macOS
brew install testscriptlocal Homebrew formula metadata
安装
brew install testscriptlocal Homebrew formula metadata
概览
Integration tests for command-line applications in .txtar format
历史
testscript is a small Go-oriented command and package for running filesystem-based command scripts, often stored as txtar files, in fresh temporary work directories.
The rogpeppe/go-internal repository was created in September 2018 and describes itself as selected Go-internal packages factored out from the standard library. The testscript package source carries Go Authors copyright notices from 2018 and documents the same script-testing style used around Go command tests.
The Homebrew formula packages the cmd/testscript executable from that repository rather than a large standalone application. Its command README says testscript runs scripts in fresh temporary work directory trees and is designed for self-contained reproductions of command sequences.
testscript's adoption is mostly inside the Go developer-tools niche: Go projects use it to write integration-style command tests with embedded fixture files, expected stdout and stderr checks, and temporary working trees.
In package-manager terms it is a niche but useful binary: installing it gives developers a direct runner for .txtar or .txt scripts without embedding it into a Go test harness.
The command runs files passed on the command line, supports environment passthrough with -e, updates embedded expected files with -u, and can preserve the temporary work directory with -work for debugging.
The package API is used from Go tests with testscript.Run, where a testdata directory contains txtar or txt scripts and each script defines a subtest.
testscript is the kind of tool package nerds notice because it turns a testing convention into a standalone command. It is especially relevant for maintainers of CLIs, compilers, formatters, and other command-line programs where golden command transcripts are easier to review than custom Go test code.
Its use of txtar keeps test fixtures and scripts in one text file, making it friendly to source-control review and reproducible bug reports.
安全态势
narrow executable package without higher-risk signals.
绿色 风险 · 低 置信度 · appliance
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
testscript | 可执行文件 | 已索引可执行文件 | 从本地可执行文件索引发现。 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
安装元数据
| 软件包键 | brew:testscript |
|---|---|
| 版本 | 1.15.0 |
| 软件包管理器 | Homebrew |
| 主页 | https://github.com/rogpeppe/go-internal/tree/master/cmd/testscript |
| 仓库 | https://github.com/rogpeppe/go-internal |
| 最后更新 | 2026-07-26T00:50:38+02:00 |
| Pulse | updated |
| Bottle | 未记录 |
| 服务 | 未声明 |
来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.