Implement test case for "time" module and add time.c it to Visual Studio project.

This commit is contained in:
Victor M. Alvarez
2017-10-13 13:32:14 +02:00
parent c17d16345b
commit 0001d4686d
2 changed files with 13 additions and 0 deletions
+12
View File
@@ -1525,6 +1525,16 @@ static void test_modules()
ERROR_INVALID_MODULE_NAME);
}
static void test_time_module()
{
assert_true_rule(
"import \"time\" \
rule test { condition: time.now() > 0 }",
NULL);
}
#if defined(HASH_MODULE)
static void test_hash_module()
{
@@ -1645,6 +1655,8 @@ int main(int argc, char** argv)
test_hash_module();
#endif
test_time_module();
yr_finalize();
return 0;
+1
View File
@@ -206,6 +206,7 @@
<ClCompile Include="..\..\..\libyara\modules\pe.c" />
<ClCompile Include="..\..\..\libyara\modules\pe_utils.c" />
<ClCompile Include="..\..\..\libyara\modules\tests.c" />
<ClCompile Include="..\..\..\libyara\modules\time.c" />
<ClCompile Include="..\..\..\libyara\object.c" />
<ClCompile Include="..\..\..\libyara\parser.c" />
<ClCompile Include="..\..\..\libyara\proc.c" />