未验证 提交 ba90fce4 编写于 作者: O openharmony_ci 提交者: Gitee

!8121 【startup】【startup_lite】【master】GetSecurityPatchTag接口返回值格式变更适配

Merge pull request !8121 from 南先森/startupupup0321
......@@ -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) {
......
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册