<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Bram&#39;s Blog</title>
    <link>https://blog.windpul.eu/</link>
    <description>Recent content on Bram&#39;s Blog</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Tue, 07 Apr 2026 18:06:31 +0000</lastBuildDate>
    <atom:link href="https://blog.windpul.eu/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>A Practical Guide to go‑internal/testscript for Testing Command‑Line Tools</title>
      <link>https://blog.windpul.eu/posts/testscript/</link>
      <pubDate>Tue, 07 Apr 2026 18:06:31 +0000</pubDate>
      <guid>https://blog.windpul.eu/posts/testscript/</guid>
      <description>&lt;p&gt;Today, I discovered an excellent testing package by &lt;a href=&#34;https://github.com/rogpeppe&#34;&gt;Roger Peppe&lt;/a&gt;: &lt;a href=&#34;https://pkg.go.dev/github.com/rogpeppe/go-internal/testscript&#34;&gt;go-internal/testscript&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;At work, I&amp;rsquo;ve been using &lt;a href=&#34;https://bats-core.readthedocs.io/en/stable/&#34;&gt;Bats&lt;/a&gt; for testing cli stuff. All of our cli stuff is almost migrated from legacy Perl-scripts to Go (using the &lt;a href=&#34;https://github.com/alecthomas/kong&#34;&gt;kong&lt;/a&gt; cmdline parser). Bats allows you to run cli programs and check the results. It does not care about the inner workings, as long as it outputs or generates the right results, the tests pass. But using a shell framework for testing Go stuff just does not feel performant. It&amp;rsquo;s a bit clumsy (&lt;a href=&#34;#testing-interactivity&#34;&gt;demo&lt;/a&gt; later on). Also, its a PITA to setup up a CI pipeline.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
