From 364dc59204e20657f7adc2b8d5a4a742eae9c2f7 Mon Sep 17 00:00:00 2001 From: nan-xiansen Date: Thu, 3 Mar 2022 19:28:42 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90startup=5Flite=E3=80=91=E3=80=90master?= =?UTF-8?q?=E3=80=91add=20SecurityPatchTag=20interface=20time=20format=20v?= =?UTF-8?q?erification=20case?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: nan-xiansen Change-Id: Ibb844c33dcea25d7d012c18aa58c99812b56209c --- .../syspara_hal/src/parameter_func_test.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/startup_lite/syspara_hal/src/parameter_func_test.c b/startup_lite/syspara_hal/src/parameter_func_test.c index 07a75e788..7a3dad00c 100755 --- a/startup_lite/syspara_hal/src/parameter_func_test.c +++ b/startup_lite/syspara_hal/src/parameter_func_test.c @@ -209,6 +209,21 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara013, Function | MediumTe AssertNotEmpty(value); }; +/** + * @tc.number : SUB_UTILS_PARAMETER_8200 + * @tc.name : Obtaining system parameter SecurityPatchTag which format is yy--mm--dd + * @tc.desc : [C- SOFTWARE -0200] + */ +LITE_TEST_CASE(ParameterFuncTestSuite, testGetSecurityPatchTag02, Function | MediumTest | Level1) +{ + const char *value = GetSecurityPatchTag(); + printf("Secure Patch Level=%s\n", value); + AssertNotEmpty(value); + char *str; + sscanf(*value, "/^[1-2]{1}([0-9]{3})-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$/", *str); + TEST_ASSERT_TRUE(*str == *value) +}; + /** * @tc.number : SUB_UTILS_PARAMETER_1400 * @tc.name : Obtaining system parameter AbiList -- GitLab