|| return $?
}
+flac_encode()
+{
+ local work_path="$1"
+
+ [ -n "$work_path" ] \
+ || flac_errlog "missing work path" \
+ || return $?
+}
+
flac_check_programs || return $?
\ No newline at end of file
source "src/lib/flac.sh"
}
-# bats test_tag=flac:check_programs
+# bats test_tags=flac:check_programs
@test "failed: check programs missing metaflac" {
command() {
[ "$2" != "metaflac" ] || return 1
assert_failure
assert_line --index 0 "❌ ERROR: command metaflac not found"
+}
+
+# bats test_tags=flac:params
+@test "failed: mising work path" {
+ run flac_encode
+
+ assert_failure
+ assert_line --index 0 "❌ ERROR: missing work path"
}
\ No newline at end of file