<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>fstest on Arrans Technical blog</title><link>https://arran4.github.io/blog/tags/fstest/</link><description>Recent content in fstest on Arrans Technical blog</description><generator>Hugo -- gohugo.io</generator><language>en</language><managingEditor>technicalblog123@arran4.com (Arran Ubels)</managingEditor><webMaster>technicalblog123@arran4.com (Arran Ubels)</webMaster><copyright>Arran Ubels. This work is licensed under a &lt;a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License&lt;/a>.</copyright><lastBuildDate>Thu, 17 Sep 2026 12:08:00 +1000</lastBuildDate><atom:link href="https://arran4.github.io/blog/tags/fstest/index.xml" rel="self" type="application/rss+xml"/><item><title>Choosing Go Filesystem Test Fixtures: embed, MapFS, and txtar</title><link>https://arran4.github.io/blog/post/2026/047-choosing-go-filesystem-test-fixtures/</link><pubDate>Thu, 17 Sep 2026 12:08:00 +1000</pubDate><author>technicalblog123@arran4.com (Arran Ubels)</author><guid>https://arran4.github.io/blog/post/2026/047-choosing-go-filesystem-test-fixtures/</guid><description>I already have broader references for txtar fixture systems, scaling txtar suites, and testing filesystem-heavy Go code. The missing piece is a smaller decision guide: when should a test use a plain embedded file, fstest.MapFS, or a txtar scenario?
The answer is mostly proportionality. Use the least elaborate representation that still makes the case readable, deterministic, and easy to extend.
A practical selection ladder A useful default is:
Test shape First choice One small input/output pair literal data or go:embed Directory structure matters more than file payloads fstest.</description></item></channel></rss>