<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Testing on Lima</title><link>https://deploy-preview-5702--lima-vm.netlify.app/docs/dev/testing/</link><description>Recent content in Testing on Lima</description><generator>Hugo</generator><language>en</language><atom:link href="https://deploy-preview-5702--lima-vm.netlify.app/docs/dev/testing/index.xml" rel="self" type="application/rss+xml"/><item><title>BATS Style Guide</title><link>https://deploy-preview-5702--lima-vm.netlify.app/docs/dev/testing/bats-style/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-5702--lima-vm.netlify.app/docs/dev/testing/bats-style/</guid><description>&lt;p&gt;Lima uses &lt;a href="https://bats-core.readthedocs.io/"&gt;BATS&lt;/a&gt; with the
&lt;a href="https://github.com/bats-core/bats-support"&gt;bats-support&lt;/a&gt;,
&lt;a href="https://github.com/bats-core/bats-assert"&gt;bats-assert&lt;/a&gt;, and
&lt;a href="https://github.com/bats-core/bats-file"&gt;bats-file&lt;/a&gt; helper libraries.&lt;/p&gt;
&lt;p&gt;All tests run with &lt;code&gt;errexit&lt;/code&gt; enabled (via &lt;code&gt;BATS_RUN_ERREXIT=1&lt;/code&gt; in
&lt;code&gt;helpers/load.bash&lt;/code&gt;), so any failing command aborts the test immediately.&lt;/p&gt;
&lt;h2 id="when-to-use-run"&gt;When to use &lt;code&gt;run&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;Use &lt;code&gt;run&lt;/code&gt; only when you need to capture output or assert a non-zero exit code.
Do not use it just to check that a command succeeds.&lt;/p&gt;
&lt;h3 id="command-should-succeed-output-does-not-matter"&gt;Command should succeed, output does not matter&lt;/h3&gt;
&lt;p&gt;Call the command directly. &lt;code&gt;errexit&lt;/code&gt; handles the failure case.&lt;/p&gt;</description></item></channel></rss>