File: ffmpeg-errors.liq

package info (click to toggle)
liquidsoap 2.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,372 kB
  • sloc: ml: 71,806; javascript: 27,320; ansic: 398; xml: 114; sh: 99; lisp: 96; makefile: 26
file content (19 lines) | stat: -rw-r--r-- 411 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
def f() =
  def on_error(e) =
    e = error.methods(e)
    test.equal(e.kind, "ffmpeg")
    test.equal(
      e.message,
      "Avutil.Error(No such file or directory)"
    )
    let [..._, {filename}] = e.trace
    test.equal(filename, "src/core/io/ffmpeg_io.ml")
    test.pass()
  end

  s = input.ffmpeg("invalid")
  s.on_error(synchronous=true, on_error)
  output.dummy(s, fallible=true)
end

test.check(f)