mirror of
https://github.com/zaphar/ucg.git
synced 2025-07-21 18:10:42 -04:00
* Assert now requires a tuple instead of a string containing statements. * We include a helpful ucg based unit testing module. Fixes: #26
17 lines
499 B
Plaintext
17 lines
499 B
Plaintext
let script = include str "./include_example.sh";
|
|
assert {
|
|
ok = script == "#!/usr/bin/env bash
|
|
echo \"included\"",
|
|
desc = "script was successfully included",
|
|
};
|
|
let expected = "IyEvdXNyL2Jpbi9lbnYgYmFzaAplY2hvICJpbmNsdWRlZCI=";
|
|
let base64 = include b64 "./include_example.sh";
|
|
assert {
|
|
ok = base64 == expected,
|
|
desc = "base64 == expected",
|
|
};
|
|
let base64safe = include b64urlsafe "./include_example.sh";
|
|
assert {
|
|
ok = base64safe == expected,
|
|
desc = "base64safe == expected",
|
|
}; |