hush 0.1.1

Hush is a unix shell scripting language based on the Lua programming language
1
2
3
4
5
6
7
8
9
10
11
12
let result = {
	echo foo | cat | false | cat | cat > /dev/null;
	echo baz
}

std.assert(std.type(result) == "error")
std.assert(std.len(result.context) == 2) # false and the subsequent cat should fail.

for error in std.iter(result.context) do
	std.assert(std.type(error) == "error")
	std.assert(error.description == "command returned non-zero")
end