[libcalamares] Add very basic test for load/save YAML
This commit is contained in:
parent
8789b52cb1
commit
f72d6ca403
@ -19,6 +19,7 @@
|
|||||||
#include "Tests.h"
|
#include "Tests.h"
|
||||||
|
|
||||||
#include "utils/Logger.h"
|
#include "utils/Logger.h"
|
||||||
|
#include "utils/YamlUtils.h"
|
||||||
|
|
||||||
#include <QtTest/QtTest>
|
#include <QtTest/QtTest>
|
||||||
|
|
||||||
@ -57,3 +58,12 @@ LibCalamaresTests::testDebugLevels()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
LibCalamaresTests::testLoadSaveYaml()
|
||||||
|
{
|
||||||
|
QFile f( "settings.conf" );
|
||||||
|
QVERIFY( f.exists() );
|
||||||
|
|
||||||
|
auto map = CalamaresUtils::loadYaml( "settings.conf" );
|
||||||
|
CalamaresUtils::saveYaml( "out.yaml", map );
|
||||||
|
}
|
||||||
|
@ -31,6 +31,8 @@ public:
|
|||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
void initTestCase();
|
void initTestCase();
|
||||||
void testDebugLevels();
|
void testDebugLevels();
|
||||||
|
|
||||||
|
void testLoadSaveYaml();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user