mirror of
https://github.com/VirusTotal/yara.git
synced 2026-10-12 02:10:00 +00:00
Implement test case for "time" module and add time.c it to Visual Studio project.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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" />
|
||||
|
||||
Reference in New Issue
Block a user