File: file_protocol.liq

package info (click to toggle)
liquidsoap 2.4.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,844 kB
  • sloc: ml: 74,136; javascript: 27,320; ansic: 505; sh: 139; xml: 114; lisp: 96; makefile: 26
file content (23 lines) | stat: -rw-r--r-- 351 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
def rlog(_) =
  ()
end

tests =
  [
    ("file:///path/to/file", "/path/to/file"),
    ("file:/path/to/file", "/path/to/file"),
    (
      "file:/path/to/my%20file",
      "/path/to/my file"
    )
  ]

def f() =
  list.iter(
    fun ((t, t')) -> test.equal(file_protocol(rlog=rlog, maxtime=1., t), t'),
    tests
  )
  test.pass()
end

test.check(f)