~jack/jackkelly-name

jackkelly-name/test/SiteSpec.hs -rw-r--r-- 9.7 KiB View raw
2ace4a85Jack Kelly Remove duplicated "blog" in feeds 5 months ago
                                                                                
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
module SiteSpec where

import Site (slug)
import Data.Foldable (for_)
import Test.Hspec

spec :: Spec
spec = do
  describe "slug" $ do
    let cases = [("Pre-departure Test Post",
                  "pre-departure_test_post"),

                 ("A Collection of College Words and Customs",
                  "a_collection_of_college_words_and_customs"),

                 ("Come-by-Chance",
                  "come-by-chance"),

                 ("My new home",
                  "my_new_home"),

                 ("Blackwall Hitch",
                  "blackwall_hitch"),

                 ("First Voyage",
                  "first_voyage"),

                 ("High Adventure: A Narrative of Air Fighting in France",
                  "high_adventure_a_narrative_of_air_fighting_in_france"),

                 ("The Man who was Thursday",
                  "the_man_who_was_thursday"),

                 ("Disintegrated Dunlops",
                  "disintegrated_dunlops"),

                 ("Dracula",
                  "dracula"),

                 ("Going for a Walk",
                  "going_for_a_walk"),

                 ("New Skill: Whipping",
                  "new_skill_whipping"),

                 ("The Awful German Language",
                  "the_awful_german_language"),

                 ("Why ZZT was so Great",
                  "why_zzt_was_so_great"),

                 ("Visitors!",
                  "visitors"),

                 ("Z+ UI Mockups",
                  "z_ui_mockups"),

                 ("Prepping for Sea",
                  "prepping_for_sea"),

                 ("Seafarers' Festival",
                  "seafarers_festival"),

                 ("Back from Voyage",
                  "back_from_voyage"),

                 ("Z+ - File Format Considerations",
                  "z_-_file_format_considerations"),

                 ("Z+ UI - A Decision",
                  "z_ui_-_a_decision"),

                 ("Rope Mat",
                  "rope_mat"),

                 ("Z+ - Board Model",
                  "z_-_board_model"),

                 ("A Sherlock Holmes Omnibus",
                  "a_sherlock_holmes_omnibus"),

                 ("The Strange Case of Dr. Jekyll and Mr. Hyde",
                  "the_strange_case_of_dr__jekyll_and_mr__hyde"),

                 ("Port Davey (Nov 2011)",
                  "port_davey_nov_2011"),

                 ("Underwater Repairs",
                  "underwater_repairs"),

                 ("A quick between-voyage post",
                  "a_quick_between-voyage_post"),

                 ("On the Duties of the Clergy",
                  "on_the_duties_of_the_clergy"),

                 ("Finished Voyaging... For Now",
                  "finished_voyaging____for_now"),

                 ("1606: An Epic Adventure",
                  "1606_an_epic_adventure"),

                 ("How not to Moor",
                  "how_not_to_moor"),

                 ("The Jungle Book and The Second Jungle Book",
                  "the_jungle_book_and_the_second_jungle_book"),

                 ("The Time Machine",
                  "the_time_machine"),

                 ("textstream",
                  "textstream"),

                 ("Inside Steve's Brain",
                  "inside_steves_brain"),

                 ("Sydney to Hobart",
                  "sydney_to_hobart"),

                 ("The Bedside Book Of Geometry",
                  "the_bedside_book_of_geometry"),

                 ("Wild Dayz",
                  "wild_dayz"),

                 ("Another Crewmate, Another Blogger",
                  "another_crewmate_another_blogger"),

                 ("On DRM and Charts",
                  "on_drm_and_charts"),

                 ("Darwin's Armada",
                  "darwins_armada"),

                 ("Evolution of a nickname",
                  "evolution_of_a_nickname"),

                 ("Repairing the Radar",
                  "repairing_the_radar"),

                 ("Roger Waters - The Wall (Live)",
                  "roger_waters_-_the_wall_live"),

                 ("Walden",
                  "walden"),

                 ("Deakin University Feb 2012",
                  "deakin_university_feb_2012"),

                 ("Jennifer Government",
                  "jennifer_government"),

                 ("Zen: The Wisdom of the East: A New Way of Life",
                  "zen_the_wisdom_of_the_east_a_new_way_of_life"),

                 ("Automating the Bunkplan",
                  "automating_the_bunkplan"),

                 ("Dead Men's Silver",
                  "dead_mens_silver"),

                 ("On Automation and API Documentation",
                  "on_automation_and_api_documentation"),

                 ("Port Davey, March 2012",
                  "port_davey_march_2012"),

                 ("Quiros",
                  "quiros"),

                 ("Another Voyage in March",
                  "another_voyage_in_march"),

                 ("Lateral Thinking: A Textbook of Creativity",
                  "lateral_thinking_a_textbook_of_creativity"),

                 ("Another Port Davey Voyage",
                  "another_port_davey_voyage"),

                 ("Programming in Prolog",
                  "programming_in_prolog"),

                 ("The Art of Assembly Language",
                  "the_art_of_assembly_language"),

                 ("Captain Hornblower R.N.",
                  "captain_hornblower_r_n_"),

                 ("American Gods",
                  "american_gods"),

                 ("Rotary Migrant Voyage",
                  "rotary_migrant_voyage"),

                 ("Another Voyage",
                  "another_voyage"),

                 ("Sophie's World",
                  "sophies_world"),

                 ("Ten Days in a Madhouse",
                  "ten_days_in_a_madhouse"),

                 ("Automating the Bunkplan (in Haskell)",
                  "automating_the_bunkplan_in_haskell"),

                 ("Ropework and Fridge",
                  "ropework_and_fridge"),

                 ("The Marlinspike Sailor",
                  "the_marlinspike_sailor"),

                 ("Final Voyage?",
                  "final_voyage"),

                 ("The Invisible Man",
                  "the_invisible_man"),

                 ("Metscrape's Revenge",
                  "metscrapes_revenge"),

                 ("Musings on D&D 4th Edition",
                  "musings_on_d_d_4th_edition"),

                 ("Playing with Wire",
                  "playing_with_wire"),

                 ("Roll Through The Ages",
                  "roll_through_the_ages"),

                 ("Mandela: A Biography",
                  "mandela_a_biography"),

                 ("Alex's Adventures in Numberland",
                  "alexs_adventures_in_numberland"),

                 ("The Curse of the Traveller",
                  "the_curse_of_the_traveller"),

                 ("Scarecrow and the Army of Theives",
                  "scarecrow_and_the_army_of_theives"),

                 ("The Legend of Sleepy Hollow",
                  "the_legend_of_sleepy_hollow"),

                 ("Brave New World",
                  "brave_new_world"),

                 ("Deakin Voyage (October 2012)",
                  "deakin_voyage_october_2012"),

                 ("The Man Who Loved Only Numbers",
                  "the_man_who_loved_only_numbers"),

                 ("Port Davey, November 2012",
                  "port_davey_november_2012"),

                 ("The Philosophical Life",
                  "the_philosophical_life"),

                 ("Final Voyage of 2012",
                  "final_voyage_of_2012"),

                 ("Living Education",
                  "living_education"),

                 ("Starship Troopers",
                  "starship_troopers"),

                 ("Merry Christmas",
                  "merry_christmas"),

                 ("Gnus and GMail",
                  "gnus_and_gmail"),

                 ("King of the Derwent",
                  "king_of_the_derwent"),

                 ("Imprisoned by the Haskell Toolchain",
                  "imprisoned_by_the_haskell_toolchain"),

                 ("Deadlands",
                  "deadlands"),

                 ("The Haskell Toolchain: Clarifications",
                  "the_haskell_toolchain_clarifications"),

                 ("Australian Wooden Boat Festival, 2013",
                  "australian_wooden_boat_festival_2013"),

                 ("Reading RSS with gnus",
                  "reading_rss_with_gnus"),

                 ("Gnus: Combining RSS feeds into a single webcomic group",
                  "gnus_combining_rss_feeds_into_a_single_webcomic_group"),

                 ("AMC",
                  "amc"),

                 ("Why build the mechanism if every policy sucks?",
                  "why_build_the_mechanism_if_every_policy_sucks"),

                 ("Traditional Sailorly Arts",
                  "traditional_sailorly_arts"),

                 ("Religion for Atheists",
                  "religion_for_atheists"),

                 ("Use an OpenPandora as a Boot Device",
                  "use_an_openpandora_as_a_boot_device"),

                 ("Stephen Brown",
                  "stephen_brown"),

                 ("The Dark Tower Series",
                  "the_dark_tower_series"),

                 ("Pot-net",
                  "pot-net"),

                 ("The Slipway",
                  "the_slipway"),

                 ("Trivia Quiz",
                  "trivia_quiz"),

                 ("Hobart to Melbourne to Hobart",
                  "hobart_to_melbourne_to_hobart"),

                 ("Fun with Flags",
                  "fun_with_flags")]
    for_ cases $ \(input, expected) -> do
      specify ("slug " ++ (show input) ++ " == " ++ (show expected)) $
        slug input `shouldBe` expected