lang/assert.sh

Util assert functions.

assert_bw()

Exit if the first arg is not between the next two exclusive (ints).

assert_dir_exists()

Exit if directory does not exist.

assert_ec()

Exit if the value is not an error as defined by this lib.

assert_eq()

Check that two values are equal (lexical); exit if not true.

assert_exe_exists()

Exit if the executable does not exit.

assert_fail()

Fail (exit) with the given message.

assert_false()

Exit if the given value is not false.

assert_file_exists()

Exit if file does not exit.

assert_function_exists()

Exit if the given name is not a function.

assert_ge()

Exit if the first arg is less than the second (ints).

assert_gt()

Exit if the first arg is less or equal to the second (ints).

assert_has_prefix()

Exit if the value does ont have the given prefix.

assert_lt()

Exit if the first arg is greater or equal to second (ints).

assert_ne()

Check that two values are not equal (lexical); exit if yes.

assert_nz()

Check that the given value is not zero; exit if not true.

assert_port_free()

Exit if the given port is not free.

assert_user()

Exit if the given name does not match the current user.

assert_user_starts_with()

Exit if the given name is not a prefix of the current user.

assert_ze()

Check that the given value is zero; exit if not true.