1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2 "http://www.w3.org/TR/html4/strict.dtd">
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>Test NumberTextBox</title>
8 <script type="text/javascript" src="../../../dojo/dojo.js"
9 djConfig="isDebug: true, extraLocale: ['zh-cn','fr-fr']"></script>
10 <script type="text/javascript" src="../../../dojo/currency.js"></script>
11 <script type="text/javascript" src="../../../dojo/number.js"></script>
12 <script type="text/javascript">
13 dojo.require("dijit.form.NumberTextBox");
14 dojo.require("dijit.form.CurrencyTextBox");
15 dojo.require("dijit.form.DateTextBox");
16 dojo.require("dijit.form.ValidationTextBox");
17 dojo.require("dojo.date.locale");
18 dojo.require("dojo.date.stamp");
19 dojo.require("dojo.parser"); // scan page for widgets and instantiate them
20 dojo.require("doh.runner");
22 <script src="test_i18n.js"></script>
23 <script type="text/javascript">
24 dojo.addOnLoad(function(){
25 doh.register("t", getAllTestCases());
30 <style type="text/css">
31 @import "../../../dojo/resources/dojo.css";
32 @import "../../themes/tundra/tundra.css";
33 @import "../css/dijitTests.css";
36 background-color:#ddd;
40 background-color:#eee;
44 background-color:#fbfbfb;
47 border:1px solid #bfbfbf;
50 .dojoTitlePaneLabel label {
54 td {white-space:nowrap}
59 <h1 class="testTitle">Dijit TextBox Globalization Test for Number</h1>
61 <!-- <h2 class="testTitle">Press the following button to start all test after this page is loaded.</h2>
62 <button id="startButton" onclick="startTest()">Start Test</button>-->
64 Before start this test, make sure the <b>dojo/cldr/nls</b> contains the data for "zh-cn", "fr-fr". If not, convert these CLDR data and put them there.
70 genFormatTestCases("Number Format", "dijit.form.NumberTextBox", [
72 { attrs: {lang: "zh-cn"},
73 desc: "Locale: zh_CN",
75 expValue: "12,345.067",
78 { attrs: {lang: "zh-cn"},
79 desc: "Locale: zh_CN",
81 expValue: "-12,345.067",
85 { attrs: {lang: "fr-fr"},
86 desc: "Locale: fr_FR",
88 expValue: "12 345,067",
91 { attrs: {lang: "fr-fr"},
92 desc: "Locale: zh_CN",
94 expValue: "-12 345,067",
99 genValidateTestCases("Number Validate", "dijit.form.NumberTextBox", [
101 { attrs: {lang: "zh-cn"},
102 desc: "Locale: zh_CN",
104 expValue: "12,345.067",
107 { attrs: {lang: "zh-cn"},
108 desc: "Locale: zh_CN",
110 expValue: "-12,345.067",
114 { attrs: {lang: "fr-fr"},
115 desc: "Locale: fr_FR",
117 expValue: "12 345,067",
120 { attrs: {lang: "fr-fr"},
121 desc: "Locale: zh_CN",
123 expValue: "-12 345,067",