 test moosh file-list command.</p>

<p>All tests start with some common boilerplate:</p>

<pre><code>#!/bin/bash
source functions.sh

install_db
install_data
cd $MOODLEDIR
</code></pre>

<p>and then the test of the commmand is performed. Script should return (exit) with 0 if test is a success, with 1 otherwise. Here is test from file-list.sh:</p>

<pre><code>if moosh file-list id=6 | grep -w "grumpycat"; then
  exit 0
else
  exit 1
fi
</code></pre>

<p>All tests are then run with run-tests.php script, which