diff options
Diffstat (limited to 'libs/js/globalize/test/culture.js')
-rw-r--r-- | libs/js/globalize/test/culture.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libs/js/globalize/test/culture.js b/libs/js/globalize/test/culture.js new file mode 100644 index 00000000..a135a5a9 --- /dev/null +++ b/libs/js/globalize/test/culture.js @@ -0,0 +1,18 @@ +module( "culture", lifecycle ); + +test("culture setter", function() { + // Issue #45: Globalize.culture("es-AO") appears to work but does not set culture + // For this test to be valid, it must use a selector that is a close + // but not exact match, so de-DE does not work as it is an exact match + // de-de would work but is only different by case, so we'll use de-FOO + var closestReturn, closestSet; + + // Set current culture using a close (but not exact) culture selector + closestReturn = Globalize.culture("de-FOO"); + + // Get current culture testing set by previous call to culture(sel) setter + closestSet = Globalize.culture(); + + equal( closestReturn.name, "de" ); + equal( closestSet.name, "de" ); +}); |