aboutsummaryrefslogtreecommitdiff
path: root/test/command/5517.md
blob: e309d84a460313f52cc4c89cda32a1ab6d15c03a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Use epub output to trigger `downloadOrRead` in `Text.Pandoc.Class`
in order to test `file:` URL-scheme handling.

There are no relative `file:` URLs, so we cannot
test with an actual file, since we don't know the
current working directory. Instead, we use `/dev/null`
as a file that certainly exists, redirect stderr
to stdout and check that there is no warning.

```
% pandoc -M title=test -f native -t epub -o /dev/null 2>&1
[Para [Image ("",[],[]) [] ("file:/dev/null","")]]
^D
```

```
% pandoc -M title=test -f native -t epub -o /dev/null 2>&1
[Para [Image ("",[],[]) [] ("file:///dev/null","")]]
^D
```

```
% pandoc -M title=test -f native -t epub -o /dev/null 2>&1
[Para [Image ("",[],[]) [] ("file://localhost/dev/null","")]]
^D
```