golang testscript .txtar 语法,用于 stderr 或 stdout 中包含的文本

golang testscript .txtar 语法,用于 stderr 或 stdout 中包含的文本

问题内容

我正在学习如何使用 https://github.com/rogpeppe/go-internal testscript 模块测试 cli 程序。

当我在 .txtar 文件中使用此行时:

stderr /No help topic/gm登录后复制