Rev | Line | |
---|
[483] | 1 | define(["doh/main", "../back", "dojo/_base/array"], function(doh, back, array){ |
---|
| 2 | doh.register("tests.back.hash", [ |
---|
| 3 | function getAndSet(t){ |
---|
| 4 | var cases = [ |
---|
| 5 | "test", |
---|
| 6 | "test with spaces", |
---|
| 7 | "test%20with%20encoded", |
---|
| 8 | "test+with+pluses", |
---|
| 9 | " leading", |
---|
| 10 | "trailing ", |
---|
| 11 | "under_score", |
---|
| 12 | "extra#mark", |
---|
| 13 | "extra?instring", |
---|
| 14 | "extra&instring", |
---|
| 15 | "#leadinghash" |
---|
| 16 | ]; |
---|
| 17 | function verify(s){ |
---|
| 18 | back.setHash(s); |
---|
| 19 | t.is(s, back.getHash(s)); |
---|
| 20 | } |
---|
| 21 | array.forEach(cases, verify); |
---|
| 22 | } |
---|
| 23 | ]); |
---|
| 24 | }); |
---|
Note: See
TracBrowser
for help on using the repository browser.