mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-04-24 15:37:23 +00:00
more consistent tests for extscripts
(fix missed filters copying found by tests btw)
This commit is contained in:
parent
72f0d4587b
commit
c57a92b687
@ -72,6 +72,7 @@ ExtScript *ExtScript::copy(const QString _fileName, const int _number)
|
||||
item->setNumber(_number);
|
||||
item->setPrefix(prefix());
|
||||
item->setRedirect(redirect());
|
||||
item->setFilters(filters());
|
||||
|
||||
return item;
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user