Skip to content

Commit

Permalink
tests: is_name_valid
Browse files Browse the repository at this point in the history
  • Loading branch information
pstorz committed Dec 6, 2019
1 parent 1be1e07 commit 0f561e0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 6 additions & 2 deletions core/src/tests/CMakeLists.txt
Expand Up @@ -467,6 +467,7 @@ IF(HAVE_PAM)
ENDIF()

gtest_discover_tests(scheduler TEST_PREFIX gtest:)
ENDIF()

####### test_is_name_valid #####################################
add_executable(test_is_name_valid test_is_name_valid.cc)
Expand All @@ -477,9 +478,12 @@ target_link_libraries(test_is_name_valid
${GTEST_MAIN_LIBRARIES}
)

gtest_discover_tests(test_is_name_valid TEST_PREFIX gtest:)
gtest_add_tests(TARGET test_is_name_valid
TEST_PREFIX gtest:
TEST_LIST found_tests)
set_tests_properties(${found_tests}
PROPERTIES ENVIRONMENT "WINEPATH=${WINEPATH}" )

ENDIF()

####### test_acl_entry_syntax #####################################
add_executable(test_acl_entry_syntax test_acl_entry_syntax.cc)
Expand Down
8 changes: 8 additions & 0 deletions core/src/tests/test_is_name_valid.cc
Expand Up @@ -19,8 +19,16 @@
02110-1301, USA.
*/

#if defined(HAVE_MINGW)
#define _S_IFDIR S_IFDIR
#define _stat stat
#include "minwindef.h"
#include "include/bareos.h"
#include "gtest/gtest.h"
#else
#include "gtest/gtest.h"
#include "include/bareos.h"
#endif
#include "lib/edit.h"

POOLMEM* msg = GetPoolMemory(PM_FNAME);
Expand Down

0 comments on commit 0f561e0

Please sign in to comment.