Fix ExcludedFilesTest on macOS

Use the same logic to find sync-exclude as check_csync_exclude.c
This commit is contained in:
Jocelyn Turcotte 2017-02-09 17:53:02 +01:00
parent 0e3e9d5991
commit 3265948458

View file

@ -11,9 +11,7 @@
using namespace OCC; using namespace OCC;
#define STR_(X) #X #define EXCLUDE_LIST_FILE SOURCEDIR"/../sync-exclude.lst"
#define STR(X) STR_(X)
#define BIN_PATH STR(OWNCLOUD_BIN_PATH)
class TestExcludedFiles: public QObject class TestExcludedFiles: public QObject
{ {
@ -31,9 +29,7 @@ private slots:
QVERIFY(!excluded.isExcluded("/a/.b", "/a", keepHidden)); QVERIFY(!excluded.isExcluded("/a/.b", "/a", keepHidden));
QVERIFY(excluded.isExcluded("/a/.b", "/a", excludeHidden)); QVERIFY(excluded.isExcluded("/a/.b", "/a", excludeHidden));
QString path(BIN_PATH); excluded.addExcludeFilePath(EXCLUDE_LIST_FILE);
path.append("/sync-exclude.lst");
excluded.addExcludeFilePath(path);
excluded.reloadExcludes(); excluded.reloadExcludes();
QVERIFY(!excluded.isExcluded("/a/b", "/a", keepHidden)); QVERIFY(!excluded.isExcluded("/a/b", "/a", keepHidden));