From: Arvin Schnell Date: Thu, 30 Jul 2026 13:16:35 +0000 (+0200) Subject: - generate test file to work around disappearing cr X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1175%2Fhead;p=thirdparty%2Fsnapper.git - generate test file to work around disappearing cr --- diff --git a/testsuite/.gitignore b/testsuite/.gitignore index 85f0d0bb..2a2b6c8b 100644 --- a/testsuite/.gitignore +++ b/testsuite/.gitignore @@ -2,4 +2,5 @@ *.o *.test *.trs +sysconfig-crlf.txt test-suite.log diff --git a/testsuite/sysconfig-crlf.cc b/testsuite/sysconfig-crlf.cc index b6039dba..274892a2 100644 --- a/testsuite/sysconfig-crlf.cc +++ b/testsuite/sysconfig-crlf.cc @@ -11,6 +11,15 @@ using namespace snapper; BOOST_AUTO_TEST_CASE(sysconfig_crlf) { + string buffer = "KEY=\"value\"\r\n"; + + // the file is generated since there were problems with the cr disappearing (by git?) + + FILE* fout = fopen("sysconfig-crlf.txt", "w"); + BOOST_REQUIRE(fout); + fwrite(buffer.c_str(), 1, buffer.size(), fout); + fclose(fout); + SysconfigFile s("sysconfig-crlf.txt"); string value; diff --git a/testsuite/sysconfig-crlf.txt b/testsuite/sysconfig-crlf.txt deleted file mode 100644 index 5e3aaa19..00000000 --- a/testsuite/sysconfig-crlf.txt +++ /dev/null @@ -1 +0,0 @@ -KEY="value"