Debian Codegraph @

testscripts/commands/list.txt

raw
1 # Test the hugo list commands.
2
3 hugo list drafts
4 ! stderr .
5 stdout 'path,slug,title,date,expiryDate,publishDate,draft,permalink'
6 stdout 'content/draft.md,draft,The Draft,2019-01-01T00:00:00Z,2090-01-01T00:00:00Z,2018-01-01T00:00:00Z,true,https://example.org/draft/'
7 stdout 'draftexpired.md'
8 stdout 'draftfuture.md'
9 ! stdout '/expired.md'
10
11 hugo list future
12 stdout 'path,slug,title,date,expiryDate,publishDate,draft,permalink'
13 stdout 'future.md'
14 stdout 'draftfuture.md'
15 ! stdout 'expired.md'
16
17 hugo list expired
18 stdout 'path,slug,title,date,expiryDate,publishDate,draft,permalink'
19 stdout 'expired.md'
20 stdout 'draftexpired.md'
21 ! stdout 'future.md'
22
23 hugo list all
24 stdout 'path,slug,title,date,expiryDate,publishDate,draft,permalink'
25 stdout 'future.md'
26 stdout 'draft.md'
27 stdout 'expired.md'
28 stdout 'draftexpired.md'
29 stdout 'draftfuture.md'
30
31 hugo list expired --clock 2000-01-01T00:00:00Z
32 ! stdout 'expired.md'
33
34 -- hugo.toml --
35 baseURL = "https://example.org/"
36 disableKinds = ["taxonomy", "term"]
37 -- content/draft.md --
38 ---
39 title: "The Draft"
40 slug: "draft"
41 draft: true
42 date: 2019-01-01
43 expiryDate: 2090-01-01
44 publishDate: 2018-01-01
45 ---
46 -- content/expired.md --
47 ---
48 date: 2018-01-01
49 expiryDate: 2019-01-01
50 ---
51 -- content/future.md --
52 ---
53 date: 2090-01-01
54 ---
55 -- content/draftfuture.md --
56 ---
57 date: 2090-01-01
58 draft: true
59 ---
60 -- content/draftexpired.md --
61 ---
62 date: 2018-01-01
63 expiryDate: 2019-01-01
64 draft: true
65 ---