source: Dev/branches/rest-dojo-ui/client/util/shrinksafe/tests/8828.js @ 256

Last change on this file since 256 was 256, checked in by hendrikvanantwerpen, 13 years ago

Reworked project structure based on REST interaction and Dojo library. As
soon as this is stable, the old jQueryUI branch can be removed (it's
kept for reference).

File size: 938 bytes
Line 
1var result = [], string_tests;
2
3(function(){
4        // testing string munging
5
6        var n = "c";
7        result.push("a" + "b", "a" + n);
8
9        var ll = "+";
10        result.push(ll);
11
12        var color = "red";
13        var f = "The" + "Quick" + color + "Fox";
14        result.push(f);
15
16        var h = 4;
17        var multiline = "this" +
18                "is" + "a" + "test"
19                + "spanning" +
20                h + "lines"
21        ;
22        result.push(multiline);
23
24        // aliases. all "bar"
25        var a = "bar", b = 'bar', c = a;
26
27        // a multi-line string outside of the array
28        var ml = "testing" +
29                "multiple" +
30                "lines";
31
32        var val = [
33                "test" + "ing",
34                "test" + a + "simple",
35                "testing" + "combined" + b + "variables",
36                "test \"+" + "weird syntax",
37                'test' + 'basic',
38                'test "mixed"',
39                ml,
40                'test "mixed" and' + 'munge',
41                "t" + "e" + "s" + "t",
42                "t" + "e" + "s" + c + "t",
43                // weirdest example imaginable?:
44                '"slightly"+"off"',
45                // fail:
46                !"a" + "b",
47                (!"a") + "b",
48                !("a") + "b"
49        ];
50
51        string_tests = function(){
52                return val;
53        }
54
55})();
Note: See TracBrowser for help on using the repository browser.