@@ -27,21 +27,21 @@ suite('Built-in functions', function() {
27
27
28
28
errors = [ ] ;
29
29
msg = bundle . getMessage ( 'num-decimal' ) ;
30
- assert . strictEqual ( bundle . formatPattern ( msg . value , { } , errors ) , '{NUMBER()}' ) ;
30
+ assert . strictEqual ( bundle . formatPattern ( msg . value , { } , errors ) , '{NUMBER($arg )}' ) ;
31
31
assert . strictEqual ( errors . length , 1 ) ;
32
32
assert . ok ( errors [ 0 ] instanceof ReferenceError ) ;
33
33
assert . strictEqual ( errors [ 0 ] . message , "Unknown variable: $arg" ) ;
34
34
35
35
errors = [ ] ;
36
36
msg = bundle . getMessage ( 'num-percent' ) ;
37
- assert . strictEqual ( bundle . formatPattern ( msg . value , { } , errors ) , '{NUMBER()}' ) ;
37
+ assert . strictEqual ( bundle . formatPattern ( msg . value , { } , errors ) , '{NUMBER($arg )}' ) ;
38
38
assert . strictEqual ( errors . length , 1 ) ;
39
39
assert . ok ( errors [ 0 ] instanceof ReferenceError ) ;
40
40
assert . strictEqual ( errors [ 0 ] . message , "Unknown variable: $arg" ) ;
41
41
42
42
errors = [ ] ;
43
43
msg = bundle . getMessage ( 'num-bad-opt' ) ;
44
- assert . strictEqual ( bundle . formatPattern ( msg . value , { } , errors ) , '{NUMBER()}' ) ;
44
+ assert . strictEqual ( bundle . formatPattern ( msg . value , { } , errors ) , '{NUMBER($arg )}' ) ;
45
45
assert . strictEqual ( errors . length , 1 ) ;
46
46
assert . ok ( errors [ 0 ] instanceof ReferenceError ) ;
47
47
assert . strictEqual ( errors [ 0 ] . message , "Unknown variable: $arg" ) ;
@@ -124,21 +124,21 @@ suite('Built-in functions', function() {
124
124
125
125
errors = [ ] ;
126
126
msg = bundle . getMessage ( 'num-decimal' ) ;
127
- assert . strictEqual ( bundle . formatPattern ( msg . value , args , errors ) , '{NUMBER()}' ) ;
127
+ assert . strictEqual ( bundle . formatPattern ( msg . value , args , errors ) , '{NUMBER($arg )}' ) ;
128
128
assert . strictEqual ( errors . length , 1 ) ;
129
129
assert . ok ( errors [ 0 ] instanceof TypeError ) ;
130
130
assert . strictEqual ( errors [ 0 ] . message , "Variable type not supported: $arg, object" ) ;
131
131
132
132
errors = [ ] ;
133
133
msg = bundle . getMessage ( 'num-percent' ) ;
134
- assert . strictEqual ( bundle . formatPattern ( msg . value , args , errors ) , '{NUMBER()}' ) ;
134
+ assert . strictEqual ( bundle . formatPattern ( msg . value , args , errors ) , '{NUMBER($arg )}' ) ;
135
135
assert . strictEqual ( errors . length , 1 ) ;
136
136
assert . ok ( errors [ 0 ] instanceof TypeError ) ;
137
137
assert . strictEqual ( errors [ 0 ] . message , "Variable type not supported: $arg, object" ) ;
138
138
139
139
errors = [ ] ;
140
140
msg = bundle . getMessage ( 'num-bad-opt' ) ;
141
- assert . strictEqual ( bundle . formatPattern ( msg . value , args , errors ) , '{NUMBER()}' ) ;
141
+ assert . strictEqual ( bundle . formatPattern ( msg . value , args , errors ) , '{NUMBER($arg )}' ) ;
142
142
assert . strictEqual ( errors . length , 1 ) ;
143
143
assert . ok ( errors [ 0 ] instanceof TypeError ) ;
144
144
assert . strictEqual ( errors [ 0 ] . message , "Variable type not supported: $arg, object" ) ;
@@ -160,21 +160,21 @@ suite('Built-in functions', function() {
160
160
161
161
errors = [ ] ;
162
162
msg = bundle . getMessage ( 'dt-default' ) ;
163
- assert . strictEqual ( bundle . formatPattern ( msg . value , { } , errors ) , '{DATETIME()}' ) ;
163
+ assert . strictEqual ( bundle . formatPattern ( msg . value , { } , errors ) , '{DATETIME($arg )}' ) ;
164
164
assert . strictEqual ( errors . length , 1 ) ;
165
165
assert . ok ( errors [ 0 ] instanceof ReferenceError ) ;
166
166
assert . strictEqual ( errors [ 0 ] . message , "Unknown variable: $arg" ) ;
167
167
168
168
errors = [ ] ;
169
169
msg = bundle . getMessage ( 'dt-month' ) ;
170
- assert . strictEqual ( bundle . formatPattern ( msg . value , { } , errors ) , '{DATETIME()}' ) ;
170
+ assert . strictEqual ( bundle . formatPattern ( msg . value , { } , errors ) , '{DATETIME($arg )}' ) ;
171
171
assert . strictEqual ( errors . length , 1 ) ;
172
172
assert . ok ( errors [ 0 ] instanceof ReferenceError ) ;
173
173
assert . strictEqual ( errors [ 0 ] . message , "Unknown variable: $arg" ) ;
174
174
175
175
errors = [ ] ;
176
176
msg = bundle . getMessage ( 'dt-bad-opt' ) ;
177
- assert . strictEqual ( bundle . formatPattern ( msg . value , { } , errors ) , '{DATETIME()}' ) ;
177
+ assert . strictEqual ( bundle . formatPattern ( msg . value , { } , errors ) , '{DATETIME($arg )}' ) ;
178
178
assert . strictEqual ( errors . length , 1 ) ;
179
179
assert . ok ( errors [ 0 ] instanceof ReferenceError ) ;
180
180
assert . strictEqual ( errors [ 0 ] . message , "Unknown variable: $arg" ) ;
@@ -267,21 +267,21 @@ suite('Built-in functions', function() {
267
267
268
268
errors = [ ] ;
269
269
msg = bundle . getMessage ( 'dt-default' ) ;
270
- assert . strictEqual ( bundle . formatPattern ( msg . value , args , errors ) , '{DATETIME()}' ) ;
270
+ assert . strictEqual ( bundle . formatPattern ( msg . value , args , errors ) , '{DATETIME($arg )}' ) ;
271
271
assert . strictEqual ( errors . length , 1 ) ;
272
272
assert . ok ( errors [ 0 ] instanceof TypeError ) ;
273
273
assert . strictEqual ( errors [ 0 ] . message , "Variable type not supported: $arg, object" ) ;
274
274
275
275
errors = [ ] ;
276
276
msg = bundle . getMessage ( 'dt-month' ) ;
277
- assert . strictEqual ( bundle . formatPattern ( msg . value , args , errors ) , '{DATETIME()}' ) ;
277
+ assert . strictEqual ( bundle . formatPattern ( msg . value , args , errors ) , '{DATETIME($arg )}' ) ;
278
278
assert . strictEqual ( errors . length , 1 ) ;
279
279
assert . ok ( errors [ 0 ] instanceof TypeError ) ;
280
280
assert . strictEqual ( errors [ 0 ] . message , "Variable type not supported: $arg, object" ) ;
281
281
282
282
errors = [ ] ;
283
283
msg = bundle . getMessage ( 'dt-bad-opt' ) ;
284
- assert . strictEqual ( bundle . formatPattern ( msg . value , args , errors ) , '{DATETIME()}' ) ;
284
+ assert . strictEqual ( bundle . formatPattern ( msg . value , args , errors ) , '{DATETIME($arg )}' ) ;
285
285
assert . strictEqual ( errors . length , 1 ) ;
286
286
assert . ok ( errors [ 0 ] instanceof TypeError ) ;
287
287
assert . strictEqual ( errors [ 0 ] . message , "Variable type not supported: $arg, object" ) ;
0 commit comments