2 # Copyright (C) 2011 Andreas Waidler <arandes@programmers.at>
4 # DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
5 # TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
7 # 0. You just DO WHAT THE FUCK YOU WANT TO.
11 feed_exists
() { assert_exists feed
; }
12 feed_empty
() { assert_empty feed
; }
13 feed_date
() { assert_date feed
1286052203; }
14 item1_exists
() { assert_exists
"feed/Item 1"; }
15 item2_exists
() { assert_exists
"feed/Item 2"; }
16 item3_exists
() { assert_exists
"feed/Item 3"; }
17 item1_date
() { assert_date
"feed/Item 1" 1286052203; }
18 item2_date
() { assert_date
"feed/Item 2" 1270203000; }
19 item3_date
() { assert_date
"feed/Item 3" 1270119246; }
20 item1_title
() { assert_value
"feed/Item 1" title
"Item 1"; }
21 item2_title
() { assert_value
"feed/Item 2" title
"Item 2"; }
22 item3_title
() { assert_value
"feed/Item 3" title
"Item 3"; }
23 item1_desc
() { assert_value
"feed/Item 1" desc
"Random item."; }
24 item2_desc
() { assert_value
"feed/Item 2" desc
"Not so random item."; }
25 item3_desc
() { assert_value
"feed/Item 3" desc
"No item."; }
26 item1_link
() { assert_value
"feed/Item 1" link
"/dev/random"; }
27 item2_link
() { assert_value
"feed/Item 2" link
"/dev/urandom"; }
28 item3_link
() { assert_value
"feed/Item 3" link
"/dev/null"; }
31 echo "Running agg on sample feed (directory missing)..."
51 echo "Running agg sample feed (up to date) ..."
71 echo "Deleting old news..."
77 echo "Running agg on sample feed (directory up to date but empty)..."
83 echo "Changing mtime..."
84 touch -md "1970-01-01 00:00:00.000000000 +0000" feed
86 echo "Running agg on sample feed (directory outdated and empty)..."