[ -f "$LIB_PATH/$lib" ] \
|| errlog "lib $LIB_PATH/$lib not found" \
|| return $?
+ source "$LIB_PATH/$lib" \
+ || errlog "could not load library $LIB_PATH/$lib" \
+ || return $?
[ -f "$albumlist" ] \
|| errlog "file $albumlist does not exists" \
assert_line --index 1 "❌ ERROR: unknown option"
}
+@test "failed: could not load library" {
+ MUSIC_PATH="build/tests/music"
+ OUTPUT_PATH="build/tests/output"
+ load_config() {
+ :
+ }
+ source() {
+ return 1
+ }
+
+ run main -i "build/tests/albumlist"
+
+ assert_failure
+ assert_line --index 0 "❌ ERROR: could not load library src/lib/vorbis.sh"
+}
+
@test "failed: albumlist not found" {
run main