fix: Fixed broken tests.

This commit is contained in:
2025-12-29 15:44:59 -05:00
parent bd3b07ddbf
commit e9d41e67ad
3 changed files with 57 additions and 11 deletions

21
filters_test.nu Normal file → Executable file
View File

@@ -5,14 +5,31 @@ use std [assert];
use ./ffmpeg.nu [complex-filter "parse filter"];
use ./filters.nu [vloop];
# #[test]
def main [] {
let test_commands = (
scope commands
| where ($it.type == "custom")
and ($it.description | str starts-with "[test]")
and not ($it.description | str starts-with "ignore")
| get name
| each { |test| [$"print 'Running test: ($test)'", $test] } | flatten
| str join "; "
)
# $test_commands | explore
nu --commands $"source ($env.CURRENT_FILE); ($test_commands)"
print "Tests completed successfully"
}
#[test]
def loop_has_defaults [] {
let got = (vloop 10 1);
let want = (complex-filter 'loop' { loop: 10 size: 1 });
assert equal $got $want;
}
# #[test]
#[test]
def setting_time_sets_start_to-1 [] {
let got = (vloop 10 1 -t 0.5);
let want = (complex-filter 'loop' {