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