]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
- generate test file to work around disappearing cr 1175/head
authorArvin Schnell <aschnell@suse.de>
Thu, 30 Jul 2026 13:16:35 +0000 (15:16 +0200)
committerArvin Schnell <aschnell@suse.de>
Thu, 30 Jul 2026 13:16:35 +0000 (15:16 +0200)
testsuite/.gitignore
testsuite/sysconfig-crlf.cc
testsuite/sysconfig-crlf.txt [deleted file]

index 85f0d0bb78cba94421ffa6230127e37b9342adb1..2a2b6c8b2c690f8c99bca93daf035b566183c4ab 100644 (file)
@@ -2,4 +2,5 @@
 *.o
 *.test
 *.trs
+sysconfig-crlf.txt
 test-suite.log
index b6039dba353eecbbf28a197bd350e3a0682beb2a..274892a2f3789bae59dfa8da92fbab309cfcf939 100644 (file)
@@ -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 (file)
index 5e3aaa1..0000000
+++ /dev/null
@@ -1 +0,0 @@
-KEY="value"