Subversion Repositories Applications.papyrus

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2150 mathias 1
if(!dojo._hasResource["tests.back-hash"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
2
dojo._hasResource["tests.back-hash"] = true;
3
dojo.provide("tests.back-hash");
4
 
5
dojo.require("dojo.back");
6
 
7
(function(){
8
	tests.register("tests.back.hash", [
9
		function getAndSet(t) {
10
			var cases = [
11
				"test",
12
				"test with spaces",
13
				"test%20with%20encoded",
14
				"test+with+pluses",
15
				" leading",
16
				"trailing ",
17
				"under_score",
18
				"extra#mark",
19
				"extra?instring",
20
				"extra&instring",
21
				"#leadinghash"
22
			];
23
			var b = dojo.back;
24
			function verify(s){
25
				dojo.back.setHash(s);
26
				t.is(s, dojo.back.getHash(s));
27
			}
28
			dojo.forEach(cases, verify);
29
		}
30
	]);
31
})();
32
 
33
}