mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2026-10-14 02:32:15 +00:00
more consistent tests for extscripts
(fix missed filters copying found by tests btw)
This commit is contained in:
1 parent
72f0d4587b
commit
c57a92b687
3 files changed
+20
-1
No files matched your search
@@ -21,7 +21,6 @@
|
||||
#include <QtTest>
|
||||
|
||||
#include "extscript.h"
|
||||
#include "version.h"
|
||||
|
||||
|
||||
void TestExtScript::initTestCase()
|
||||
@@ -44,6 +43,9 @@ void TestExtScript::cleanupTestCase()
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void TestExtScript::test_values()
|
||||
{
|
||||
QCOMPARE(extScript->interval(), 1);
|
||||
@@ -87,4 +89,19 @@ void TestExtScript::test_filters()
|
||||
}
|
||||
|
||||
|
||||
void TestExtScript::test_copy()
|
||||
{
|
||||
ExtScript *newExtScript = extScript->copy(QString("/dev/null"), 1);
|
||||
|
||||
QCOMPARE(newExtScript->interval(), extScript->interval());
|
||||
QCOMPARE(newExtScript->executable(), extScript->executable());
|
||||
QCOMPARE(newExtScript->strRedirect(), extScript->strRedirect());
|
||||
QCOMPARE(newExtScript->prefix(), extScript->prefix());
|
||||
QCOMPARE(newExtScript->filters(), extScript->filters());
|
||||
QCOMPARE(newExtScript->number(), 1);
|
||||
|
||||
delete newExtScript;
|
||||
}
|
||||
|
||||
|
||||
QTEST_MAIN(TestExtScript);
|
||||
@@ -38,6 +38,7 @@ private slots:
|
||||
void test_values();
|
||||
void test_run();
|
||||
void test_filters();
|
||||
void test_copy();
|
||||
|
||||
private:
|
||||
ExtScript *extScript = nullptr;
|
||||
|
||||
Reference in new issue
Block a user