Skip to content

Commit 324b8d4

Browse files
committed
Add test for Whisper::Context#full_get_segment
1 parent 0a52548 commit 324b8d4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

bindings/ruby/tests/test_whisper.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ def test_full_lang_id
2929
assert_equal 0, whisper.full_lang_id
3030
end
3131

32+
def test_full_get_segment
33+
segment = whisper.full_get_segment(0)
34+
assert_equal 0, segment.start_time
35+
assert_match /ask not what your country can do for you, ask what you can do for your country/, segment.text
36+
end
37+
3238
def test_full_get_segment_t0
3339
assert_equal 0, whisper.full_get_segment_t0(0)
3440
assert_raise IndexError do

0 commit comments

Comments
 (0)