summaryrefslogtreecommitdiff
path: root/includes/js/dojo/tests/currency.js
diff options
context:
space:
mode:
authormensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-11-14 15:39:19 +0000
committermensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-11-14 15:39:19 +0000
commit1c5685d68f1b73270fb814fe04cbb490eb90ba5f (patch)
tree3d3ada08a934b96fc31531f1327690d7edc6f766 /includes/js/dojo/tests/currency.js
parent104d59099e048688c4dbac37d72137006e396558 (diff)
downloadsemanticscuttle-1c5685d68f1b73270fb814fe04cbb490eb90ba5f.tar.gz
semanticscuttle-1c5685d68f1b73270fb814fe04cbb490eb90ba5f.tar.bz2
Minor fix: Remove DOJO library (60Mo) replaced by link to Google CDN (online DOJO library)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@159 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'includes/js/dojo/tests/currency.js')
-rw-r--r--includes/js/dojo/tests/currency.js48
1 files changed, 0 insertions, 48 deletions
diff --git a/includes/js/dojo/tests/currency.js b/includes/js/dojo/tests/currency.js
deleted file mode 100644
index 8375725..0000000
--- a/includes/js/dojo/tests/currency.js
+++ /dev/null
@@ -1,48 +0,0 @@
-if(!dojo._hasResource["tests.currency"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["tests.currency"] = true;
-dojo.provide("tests.currency");
-
-dojo.require("dojo.currency");
-
-tests.register("tests.currency",
- [
- {
- // Test formatting and parsing of currencies in various locales pre-built in dojo.cldr
- // NOTE: we can't set djConfig.extraLocale before bootstrapping unit tests, so directly
- // load resources here for specific locales:
-
- name: "currency",
- setUp: function(){
- var partLocaleList = ["en-us", "en-ca", "de-de"];
- for(var i = 0 ; i < partLocaleList.length; i ++){
- dojo.requireLocalization("dojo.cldr","currency",partLocaleList[i], "zh,en-ca,pt,en-us,de,ja,en,en-au,ROOT,fr,es,ko,zh-tw,it");
- dojo.requireLocalization("dojo.cldr","number",partLocaleList[i], "zh-cn,zh,ko-kr,pt,en-us,en-gb,de,ja,ja-jp,en,ROOT,en-au,fr,es,ko,zh-tw,it,es-es,de-de");
- }
- },
- runTest: function(t){
- t.is("\u20ac123.45", dojo.currency.format(123.45, {currency: "EUR", locale: "en-us"}));
- t.is("$123.45", dojo.currency.format(123.45, {currency: "USD", locale: "en-us"}));
- t.is("$1,234.56", dojo.currency.format(1234.56, {currency: "USD", locale: "en-us"}));
- t.is("US$123.45", dojo.currency.format(123.45, {currency: "USD", locale: "en-ca"}));
- t.is("$123.45", dojo.currency.format(123.45, {currency: "CAD", locale: "en-ca"}));
- t.is("Can$123.45", dojo.currency.format(123.45, {currency: "CAD", locale: "en-us"}));
- t.is("123,45 \u20ac", dojo.currency.format(123.45, {currency: "EUR", locale: "de-de"}));
- t.is("1.234,56 \u20ac", dojo.currency.format(1234.56, {currency: "EUR", locale: "de-de"}));
- // There is no special currency symbol for ADP, so expect the ISO code instead
- t.is("ADP123", dojo.currency.format(123, {currency: "ADP", locale: "en-us"}));
-
- t.is(123.45, dojo.currency.parse("$123.45", {currency: "USD", locale: "en-us"}));
- t.is(1234.56, dojo.currency.parse("$1,234.56", {currency: "USD", locale: "en-us"}));
- t.is(123.45, dojo.currency.parse("123,45 \u20ac", {currency: "EUR", locale: "de-de"}));
- t.is(1234.56, dojo.currency.parse("1.234,56 \u20ac", {currency: "EUR", locale: "de-de"}));
- t.is(1234.56, dojo.currency.parse("1.234,56\u20ac", {currency: "EUR", locale: "de-de"}));
-
- t.is(1234, dojo.currency.parse("$1,234", {currency: "USD", locale: "en-us"}));
- t.is(1234, dojo.currency.parse("$1,234", {currency: "USD", fractional: false, locale: "en-us"}));
- t.t(isNaN(dojo.currency.parse("$1,234", {currency: "USD", fractional: true, locale: "en-us"})));
- }
- }
- ]
-);
-
-}