diff --git a/startup/startup_standard/deviceinfo/src/main/js/test/DeviceInfoJsUnit.test.js b/startup/startup_standard/deviceinfo/src/main/js/test/DeviceInfoJsUnit.test.js index 30887896602fa104abf7d1bf8d1a91e8d3b933ee..a3b2f35fec6e0f2c5f97b154be8d223f446fa075 100644 --- a/startup/startup_standard/deviceinfo/src/main/js/test/DeviceInfoJsUnit.test.js +++ b/startup/startup_standard/deviceinfo/src/main/js/test/DeviceInfoJsUnit.test.js @@ -385,7 +385,7 @@ export default function DeviceInfoTest() { expect(securityPatchTagInfo).assertInstanceOf('String'); if (securityPatchTagInfo != "" && securityPatchTagInfo != null && securityPatchTagInfo != undefined) { - let str = /[\w-\.\(\)]/g; + let str = /[\w\/\.\(\)]/g; let arr = securityPatchTagInfo.match(str); let bufferstr = arr.join(''); console.info('the value of the bufferstr is :' + bufferstr); @@ -1571,7 +1571,7 @@ export default function DeviceInfoTest() { let securityPatchTagInfo = deviceinfo.securityPatchTag; console.info('the value of the deviceinfo securityPatchTag is :' + securityPatchTagInfo); - let reFormat = /^(\d{4})-(\d{2})-(\d{2})$/; + let reFormat = /^(\d{4})\/(\d{2})\/(\d{2})$/; let re = securityPatchTagInfo.match(reFormat); if (re != null) { diff --git a/startup_lite/syspara_hal/src/deviceinfo_func_test.c b/startup_lite/syspara_hal/src/deviceinfo_func_test.c index aa1004b7c8e6f667eee2bcf7345df14f10a6c678..8f89b6d3be9a398a9eac7e134d559b7439a834e0 100644 --- a/startup_lite/syspara_hal/src/deviceinfo_func_test.c +++ b/startup_lite/syspara_hal/src/deviceinfo_func_test.c @@ -465,12 +465,12 @@ LITE_TEST_CASE(DeviceInfoFuncTestSuite, int year, month, day; const int RET_SUCCESS = 0; - int ret = sscanf_s(value, "%04d-%02d-%02d", &year, &month, &day); + int ret = sscanf_s(value, "%04d\/%02d\/%02d", &year, &month, &day); if (ret < RET_SUCCESS) { TEST_ASSERT_TRUE(ret >= 0); } - printf("%04d-%02d-%02d\n", year, month, day); + printf("%04d\/%02d\/%02d\n", year, month, day); TEST_ASSERT_TRUE(year > 1900 && year < 2056); TEST_ASSERT_TRUE(month <= 12 && month > 0);