Changeset View
Changeset View
Standalone View
Standalone View
autotests/test-config.h.in
Show All 35 Lines | |||||
36 | /** | 36 | /** | ||
37 | * init repository with right search paths, is needed if the files are not compiled in | 37 | * init repository with right search paths, is needed if the files are not compiled in | ||
38 | * as resources | 38 | * as resources | ||
39 | * | 39 | * | ||
40 | * @param repository repository to init search paths | 40 | * @param repository repository to init search paths | ||
41 | */ | 41 | */ | ||
42 | void initRepositorySearchPaths(KSyntaxHighlighting::Repository &repository) | 42 | void initRepositorySearchPaths(KSyntaxHighlighting::Repository &repository) | ||
43 | { | 43 | { | ||
44 | #ifdef HAS_SYNTAX_RESOURCE | 44 | // add extra search path for e.g. broken highlighting test | ||
45 | Q_UNUSED(repository) | 45 | repository.addCustomSearchPath(QStringLiteral(TESTSRCDIR "/input")); | ||
46 | #else | 46 | | ||
47 | // handle no-resources case | ||||
48 | #ifndef HAS_SYNTAX_RESOURCE | ||||
47 | repository.addCustomSearchPath(QStringLiteral("@CMAKE_SOURCE_DIR@/data")); | 49 | repository.addCustomSearchPath(QStringLiteral("@CMAKE_SOURCE_DIR@/data")); | ||
48 | repository.addCustomSearchPath(QStringLiteral("@CMAKE_BINARY_DIR@/data/generated")); | 50 | repository.addCustomSearchPath(QStringLiteral("@CMAKE_BINARY_DIR@/data/generated")); | ||
49 | #endif | 51 | #endif | ||
50 | } | 52 | } | ||
51 | 53 | | |||
52 | /** | 54 | /** | ||
53 | * helper to compare files | 55 | * helper to compare files | ||
54 | * @param refFile reference file | 56 | * @param refFile reference file | ||
▲ Show 20 Lines • Show All 49 Lines • Show Last 20 Lines |