Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
invoking FormatterTest2

numeric format:
123456.789 = 123,456.789
PI = +3.14159265
65535(hex) = 0xffff
65535(oct) = 0177777

string format:
test string: abc株表噂十豹竹敷~椄*@ABC18921壹捌玖貳壹貳參肆伍陸柒捌玖拾一丁七/\
upper case : ABC株表噂十豹竹敷~椄*@ABC18921壹捌玖貳壹貳參肆伍陸柒捌玖拾一丁七/\

date/time format:
test for 2007/01/01
current date: 2007/01/01 (週一) CST
current time: 上午 12:00:00 GMT+0800
month(full) : 1月
month(short): 1月
day of week : 星期一

date/time format:
test for 2007/08/01
current date: 2007/08/01 (週三) CST
current time: 上午 12:00:00 GMT+0800
month(full) : 8月
month(short): 8月
day of week : 星期三

date/time format:
test for 2007/02/29 which does not exist
current date: 2007/03/01 (週四) CST
current time: 上午 12:00:00 GMT+0800
month(full) : 3月
month(short): 3月
day of week : 星期四

date/time format:
test for 2008/02/29
current date: 2008/02/29 (週五) CST
current time: 上午 12:00:00 GMT+0800
month(full) : 2月
month(short): 2月
day of week : 星期五

date/time format:
test for 2007/04/31 which does not exist
current date: 2007/05/01 (週二) CST
current time: 上午 12:00:00 GMT+0800
month(full) : 5月
month(short): 5月
day of week : 星期二

date/time format:
test for 2007/12/32 which does not exist
current date: 2008/01/01 (週二) CST
current time: 上午 12:00:00 GMT+0800
month(full) : 1月
month(short): 1月
day of week : 星期二
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
invoking FormatterTest2

numeric format:
123456.789 = 123,456.789
PI = +3.14159265
65535(hex) = 0xffff
65535(oct) = 0177777

string format:
test string: abc株表噂十豹竹敷~椄*@ABC18921壹捌玖貳壹貳參肆伍陸柒捌玖拾一丁七/\
upper case : ABC株表噂十豹竹敷~椄*@ABC18921壹捌玖貳壹貳參肆伍陸柒捌玖拾一丁七/\

date/time format:
test for 2007/01/01
current date: 2007/01/01 (週一) CST
current time: 上午 12:00:00 GMT+0800
month(full) : 1月
month(short): 1月
day of week : 星期一

date/time format:
test for 2007/08/01
current date: 2007/08/01 (週三) CST
current time: 上午 12:00:00 GMT+0800
month(full) : 8月
month(short): 8月
day of week : 星期三

date/time format:
test for 2007/02/29 which does not exist
current date: 2007/03/01 (週四) CST
current time: 上午 12:00:00 GMT+0800
month(full) : 3月
month(short): 3月
day of week : 星期四

date/time format:
test for 2008/02/29
current date: 2008/02/29 (週五) CST
current time: 上午 12:00:00 GMT+0800
month(full) : 2月
month(short): 2月
day of week : 星期五

date/time format:
test for 2007/04/31 which does not exist
current date: 2007/05/01 (週二) CST
current time: 上午 12:00:00 GMT+0800
month(full) : 5月
month(short): 5月
day of week : 星期二

date/time format:
test for 2007/12/32 which does not exist
current date: 2008/01/01 (週二) CST
current time: 上午 12:00:00 GMT+0800
month(full) : 1月
month(short): 1月
day of week : 星期二
18 changes: 0 additions & 18 deletions functional/MBCS_Tests/formatter/playlist.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,6 @@ limitations under the License.
<testCaseName>MBCS_Tests_formatter_zh_TW_linux</testCaseName>
<command>LANG=zh_TW.UTF-8 bash $(TEST_RESROOT)$(D)test.sh; \
$(TEST_STATUS)</command>
<disables>
<disable>
<comment>https://github.com/eclipse-openj9/openj9/issues/19083</comment>
<version>22+</version>
<impl>openj9</impl>
</disable>
<disable>
<comment>https://github.com/adoptium/aqa-tests/issues/5148</comment>
<version>22+</version>
<impl>hotspot</impl>
</disable>
</disables>
<platformRequirements>os.linux</platformRequirements>
<levels>
<level>special</level>
Expand Down Expand Up @@ -249,12 +237,6 @@ limitations under the License.
</test>
<test>
<testCaseName>MBCS_Tests_formatter_ZH_TW_aix</testCaseName>
<disables>
<disable>
<comment>https://github.com/adoptium/aqa-tests/issues/5148</comment>
<version>22+</version>
</disable>
</disables>
<command>LANG=ZH_TW ksh $(TEST_RESROOT)$(D)test.sh; \
$(TEST_STATUS)</command>
<platformRequirements>os.aix</platformRequirements>
Expand Down
18 changes: 16 additions & 2 deletions functional/MBCS_Tests/formatter/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,23 @@ OUTPUT=output.txt

. ${BASE}/check_env_unix.sh
CHARMAP=${FULLLANG}
SOURCE="${CHARMAP}.txt"

# Get Java major version
FULL_VERSION=$(java -version 2>&1 | grep 'version' | cut -d '"' -f2)
JAVA_VERSION=${FULL_VERSION%%.*}

#_22 file is only applicable for taiwanese in AIX and Linux else it should fall back to default
if { [ "$CHARMAP" = "Linux_zh_TW.UTF-8" ] || [ "$CHARMAP" = "AIX_ZH_TW.UTF-8" ]; } && [ "$JAVA_VERSION" -ge 22 ]; then
SOURCE="${CHARMAP}_22.txt"
else
SOURCE="${CHARMAP}.txt"
fi

# Create the expected file name
EXP_FILE=expected_${SOURCE}

echo "invoking FormatterTest2" > ${OUTPUT}
${JAVA_BIN}/java FormatterTest2 abc${TEST_STRING} >> ${OUTPUT}
diff ${BASE}/expected_${SOURCE} ${OUTPUT} > /dev/null 2>&1
diff ${BASE}/${EXP_FILE} ${OUTPUT} > /dev/null 2>&1
RESULT=$?
exit ${RESULT}