Browse Source

Fix INI test

testing/bash_completion_debugging
Martchus 4 years ago
committed by Marius Kittler
parent
commit
ace077f9aa
  1. 2
      .gitignore
  2. 5
      tests/iotests.cpp

2
.gitignore

@ -38,7 +38,7 @@ Makefile*
.directory
# tests
testfiles/output.*
testfiles/workingdir/
# clang-format
/.clang-format

5
tests/iotests.cpp

@ -17,6 +17,7 @@
using namespace std;
using namespace IoUtilities;
using namespace TestUtilities;
using namespace CPPUNIT_NS;
@ -283,12 +284,12 @@ void IoTests::testIniFile()
// write values to another file
fstream outputFile;
outputFile.exceptions(ios_base::failbit | ios_base::badbit);
outputFile.open(TestUtilities::testFilePath("output.ini"), ios_base::out | ios_base::trunc);
outputFile.open(workingCopyPathMode("output.ini", WorkingCopyMode::NoCopy), ios_base::out | ios_base::trunc);
ini.make(outputFile);
// parse written values (again)
outputFile.close();
outputFile.open(TestUtilities::testFilePath("output.ini"), ios_base::in);
outputFile.open(workingCopyPathMode("output.ini", WorkingCopyMode::NoCopy), ios_base::in);
IniFile ini2;
ini2.parse(outputFile);
CPPUNIT_ASSERT(ini.data() == ini2.data());

Loading…
Cancel
Save