Skip to content

Instantly share code, notes, and snippets.

@fennecdjay
Created July 22, 2017 00:09
Show Gist options
  • Save fennecdjay/d35b2cd1e4d3b229c3e54a03e73a7103 to your computer and use it in GitHub Desktop.
Save fennecdjay/d35b2cd1e4d3b229c3e54a03e73a7103 to your computer and use it in GitHub Desktop.

Tests

test.sh requires valgrind there are two kinds of tests:

Gwion tests

those tests are just gwion (.gw) files, handling special comments:

  • // [skip] (optionally followed by reason to skip)
  • // [todo] (optionally followed by reason to delay testing)
  • // [contains] followed by string to match
  • // [excludes] followed by string not to match

Shell test

those tests are just bash (.sh) files.
they should start with this snippet

#!/bin/bash
# [test] #5
n=0
[ "$1" ] && n="$1"
[ "$n" -eq 0 ] && n=1
source tests/sh/common.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment