| 1 |
# Copyright (C) 2016 and later: Unicode, Inc. and others. |
| 2 |
# License & terms of use: http://www.unicode.org/copyright.html |
| 3 |
###################################################################### |
| 4 |
# Copyright (c) 2004-2011 International Business Machines |
| 5 |
# Corporation and others. All Rights Reserved. |
| 6 |
###################################################################### |
| 7 |
# Author: Alan Liu |
| 8 |
# Created: March 15 2004 |
| 9 |
# Since: ICU 3.0 |
| 10 |
###################################################################### |
| 11 |
|
| 12 |
ref= "#.#" |
| 13 |
|
| 14 |
rt: "0.###" 1.0 "1" |
| 15 |
|
| 16 |
# Basics |
| 17 |
fp: "0.####" 0.10005 "0.1" 0.1 |
| 18 |
fp: - 0.10006 "0.1001" 0.1001 |
| 19 |
pat: - "0.####" |
| 20 |
fp: "#.####" 0.10005 "0.1" 0.1 |
| 21 |
pat: - "0.####" |
| 22 |
|
| 23 |
rt: "0" 1234 "1234" |
| 24 |
pat: - "0" |
| 25 |
|
| 26 |
# Significant digits |
| 27 |
fp: "@@@" 1.234567 "1.23" 1.23 |
| 28 |
fp: - 1234567 "1230000" 1230000 |
| 29 |
fp: - 0.012345 "0.0123" 0.0123 |
| 30 |
pat: - - |
| 31 |
fp: "#,@@@" 1234567 "1,230,000" 1230000 |
| 32 |
pat: - "#,@@@" |
| 33 |
rt: "@@@@" 0.0012 "0.001200" |
| 34 |
fp: - 0.99999 "1.000" 1 |
| 35 |
pat: - - |
| 36 |
rt: "@###" 0.00123 "0.00123" |
| 37 |
rt: - 123000 "123000" |
| 38 |
fp: - 123456 "123500" 123500 |
| 39 |
fp: - 12.3456 "12.35" 12.35 |
| 40 |
fp: - 0.0123456 "0.01235" 0.01235 |
| 41 |
pat: - - |
| 42 |
fp: "@,###" 27182 "27,180" 27180 |
| 43 |
rt: - 123000 "123,000" |
| 44 |
fp: - 0.99999 "1" 1 |
| 45 |
rt: - 0.9999 "0.9999" |
| 46 |
pat: - - |
| 47 |
rt: "@##E0" 20000 "2E4" |
| 48 |
rt: - 27000 "2.7E4" |
| 49 |
rt: - 27100 "2.71E4" |
| 50 |
fp: - 27182 "2.72E4" 27200 |
| 51 |
pat: - - |
| 52 |
rt: "@@@E0" 20000 "2.00E4" |
| 53 |
rt: - 27000 "2.70E4" |
| 54 |
rt: - 27100 "2.71E4" |
| 55 |
fp: - 27182 "2.72E4" 27200 |
| 56 |
pat: - - |
| 57 |
fp: "#,@@##" 314156 "31,4200" 314200 |
| 58 |
rt: - 3 "3.0" |
| 59 |
rt: - 5000 "5000" |
| 60 |
rt: - 0.005 "0.0050" |
| 61 |
pat: - - |
| 62 |
fp: "@@@@@@" 123456.7 "123457" 123457 |
| 63 |
pat: - - |
| 64 |
|
| 65 |
pat: "##,@@##" "#,@@##" |
| 66 |
pat: "##@@##" "@@##" |
| 67 |
|
| 68 |
pat: "@@.@@" err # decimal sep. disallowed in sig. digits |
| 69 |
pat: "@#@" err # only one cluster of sig. digits |
| 70 |
pat: "@@0" err # either @ or 0, not both |
| 71 |
|
| 72 |
# NumberRegression/Test4140009 |
| 73 |
rt: "" 123.456 "123.456" |
| 74 |
rt: "" -123.456 "-123.456" |
| 75 |
|
| 76 |
# Currency |
| 77 |
fpc: "en_US" 1234.56/USD "$1,234.56" 1234.56/USD |
| 78 |
fpc: - 1234.56/JPY "\u00A51,235" 1235/JPY |
| 79 |
# ISO codes that overlap display names (QQQ vs. Q) |
| 80 |
# recognize real ISO name in parsing, so, can not use fake name as QQQ |
| 81 |
#fpc: - 123/QQQ "QQQ123.00" 123/QQQ # QQQ is fake |
| 82 |
fpc: - 123/GTQ "GTQ 123.00" 123/GTQ |
| 83 |
# ChoiceFormat-based display names |
| 84 |
fpc: - 1/INR "\u20b91.00" 1/INR |
| 85 |
fpc: - 2/INR "\u20b92.00" 2/INR |
| 86 |
# Display names with shared prefix (YDD vs. Y) |
| 87 |
fpc: - 100/YDD "YDD 100.00" 100/YDD |
| 88 |
fpc: - 100/CNY "CN\u00a5100.00" 100/CNY |
| 89 |
|
| 90 |
# Regression Tests bug#7914 |
| 91 |
p: "#E00" "12E12" "12000000000000" |
| 92 |
p: "#####" "12E12" "12000000000000" |