summaryrefslogtreecommitdiffstats
path: root/mmc_updater/src/tests/TestUpdateScript.cpp
blob: 30a7572ac24606305581d972c837f247cf23468b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include "TestUpdateScript.h"

#include "TestUtils.h"
#include "UpdateScript.h"

#include <iostream>
#include <algorithm>

void TestUpdateScript::testV2Script()
{
	UpdateScript newFormat;
	UpdateScript oldFormat;

	newFormat.parse("file_list.xml");
	oldFormat.parse("v2_file_list.xml");

	TEST_COMPARE(newFormat.filesToInstall(),oldFormat.filesToInstall());
	TEST_COMPARE(newFormat.filesToUninstall(),oldFormat.filesToUninstall());
}

int main(int,char**)
{
	TestList<TestUpdateScript> tests;
	tests.addTest(&TestUpdateScript::testV2Script);
	return TestUtils::runTest(tests);
}