Windows下Goland 等Jetbains IDEA运行测试用例时,出现如下问题之一

  1. 未进行任何测试(no test were run)
  2. 输出文本被截断
  3. 多出空格

最开始以为是用的fmt.Print打印,换成t.Log还是不行,换成Idea也不行,网站一直没找到答案

最后参照Goland测试用例打印出现空格和显示不全问题 (zdzyzy.com)
修复成功,这里记录一下。

先 双击shift 输入registry

image-4.png

然后点击 注册表(Registry)

找到 go.run.processes.with.pty 去掉勾选

image-5.png

点击关闭,然后重启Goland