mirror of
https://github.com/sbrow/nu-ffmpeg.git
synced 2025-12-29 16:23:11 -05:00
fix: Fixed broken tests.
This commit is contained in:
21
filters_test.nu
Normal file → Executable file
21
filters_test.nu
Normal file → Executable 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' {
|
||||
|
||||
Reference in New Issue
Block a user