Imported upstream version 0.08.02
[liburi-template-perl.git] / t / data / spec.json
1 {
2    "variables" : {
3       "e" : "20% tricky",
4       "a" : "fred",
5       "scheme" : "https",
6       "d" : "one two three",
7       "20" : "this-is-spinal-tap",
8       "p" : "quote=to+be+or+not+to+be",
9       "c" : "cheeseburger",
10       "q" : "hullo#world",
11       "b" : "barney",
12       "f" : ""
13    },
14    "tests" : [
15       {
16          "template" : "http://example.org/page1#{a}",
17          "expected" : "http://example.org/page1#fred"
18       },
19       {
20          "template" : "http://example.org/{a}/{b}/",
21          "expected" : "http://example.org/fred/barney/"
22       },
23       {
24          "template" : "http://example.org/{a}{b}/",
25          "expected" : "http://example.org/fredbarney/"
26       },
27       {
28          "template" : "http://example.com/order/{c}/{c}/{c}/",
29          "expected" : "http://example.com/order/cheeseburger/cheeseburger/cheeseburger/"
30       },
31       {
32          "template" : "http://example.org/{d}",
33          "expected" : "http://example.org/one%20two%20three"
34       },
35       {
36          "template" : "http://example.org/{e}",
37          "expected" : "http://example.org/20%25%20tricky"
38       },
39       {
40          "template" : "http://example.com/{f}/",
41          "expected" : "http://example.com//"
42       },
43       {
44          "template" : "{scheme}://{20}.example.org?date={wilma}&option={a}",
45          "expected" : "https://this-is-spinal-tap.example.org?date=&option=fred"
46       },
47       {
48          "template" : "http://example.org?{p}",
49          "expected" : "http://example.org?quote=to+be+or+not+to+be"
50       },
51       {
52          "template" : "http://example.com/{q}",
53          "expected" : "http://example.com/hullo#world"
54       }
55    ]
56 }