view example.sh @ 3:0798045f37b5 default tip

Add blog post link to README.
author Jang Rush <weakish@gmail.com>
date Mon, 05 Sep 2022 10:50:14 +0000
parents ed67ca9ff4c7
children
line wrap: on
line source

# Include bricolage library
. ./b.sh

# Simple test
mytest() {
	ok 1 -eq 1
	ok foo = foo
	foo="Foo bar"
	ok "$foo" = "Foo bar"
}

myspytest() {
	spy date
	date
	ok "$(cat $T/spy.date.stdout)" != "foo"
	echo foo > $T/spy.date
	date
	ok "$(tail -n 1 $T/spy.date.stdout)" = "foo"
}

# Run tests
bricolage mytest
bricolage myspytest

# Remove test data
rm -r "$T"