mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-29 10:25:36 -04:00
[libcalamares] Add very basic test for load/save YAML
This commit is contained in:
parent
8789b52cb1
commit
f72d6ca403
2 changed files with 12 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue