2 ("Basic, no replacement"
4 (stub bookmarker-get-bookmarks => '(("One" . "http://www.one.com")))
5 (bookmarker-expand-url "One"))
7 "No replacement occurs"))
10 (stub read-from-minibuffer => "a string")
11 (stub bookmarker-get-bookmarks => '(("One" . "http://www.one.com?q=%{first}")))
12 (bookmarker-expand-url "One"))
13 "http://www.one.com\\?q=a%20string"
14 "One, simple replacement works")
16 (stub read-from-minibuffer => "a string")
17 (stub bookmarker-get-bookmarks => '(("One" . "http://www.one.com?q=%{first}&j=%{blah}")))
18 (bookmarker-expand-url "One"))
19 "http://www.one.com\\?q=a%20string&j=a%20string"
20 "Two replacements work"))
23 (stub read-from-minibuffer => "HELLO WORLD")
24 (stub bookmarker-get-bookmarks => '(("One" . "http://www.one.com?q=%{first}&j=%{blah}")))
25 (bookmarker-expand-url "One"))
26 "http://www.one.com\\?q=HELLO%20WORLD&j=HELLO%20WORLD"
27 "Once failing test case works")))