From 56a7e8c1de4652d253de57a4366c9e369c03a31b Mon Sep 17 00:00:00 2001 From: Arvin Schnell Date: Thu, 30 Jul 2026 15:16:35 +0200 Subject: [PATCH] - generate test file to work around disappearing cr --- testsuite/.gitignore | 1 + testsuite/sysconfig-crlf.cc | 9 +++++++++ testsuite/sysconfig-crlf.txt | 1 - 3 files changed, 10 insertions(+), 1 deletion(-) delete mode 100644 testsuite/sysconfig-crlf.txt 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" -- 2.47.3