]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Fix conf_set_unknown_option unit test failure on Windows
authorJoel Rosdahl <joel@rosdahl.net>
Sun, 23 Feb 2020 21:26:48 +0000 (22:26 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Sun, 23 Feb 2020 21:26:48 +0000 (22:26 +0100)
unittest/test_args.c
unittest/test_conf.c
unittest/util.c

index 65c66d8d95f708643796a264a89774f3596e6c3a..60302950c435e903b9dcf771ca0cbb83b378c6d7 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2010-2018 Joel Rosdahl
+// Copyright (C) 2010-2020 Joel Rosdahl
 //
 // This program is free software; you can redistribute it and/or modify it
 // under the terms of the GNU General Public License as published by the Free
@@ -74,11 +74,7 @@ TEST(args_init_from_gcc_atfile)
        CHECK_STR_EQ("fourth", args->argv[3]);
        CHECK_STR_EQ("fif th", args->argv[4]);
        CHECK_STR_EQ("si'x\" th", args->argv[5]);
-#ifndef _WIN32
        CHECK_STR_EQ("seve\nth", args->argv[6]);
-#else
-       CHECK_STR_EQ("seve\r\nth", args->argv[6]);
-#endif
        CHECK(!args->argv[7]);
        args_free(args);
 }
index a203ec8752ce13f7912fc03e17e8bda4dc67aa4e..b9c4e4d29212fa7d8c43e8d86d69f37a82b07fd5 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2011-2019 Joel Rosdahl
+// Copyright (C) 2011-2020 Joel Rosdahl
 //
 // This program is free software; you can redistribute it and/or modify it
 // under the terms of the GNU General Public License as published by the Free
index 1e52c525c45b49a7eee0f30d44433871120577a5..e06761a276aa5cc0b1588dca20dc6d4a6392a9f2 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2010-2018 Joel Rosdahl
+// Copyright (C) 2010-2020 Joel Rosdahl
 //
 // This program is free software; you can redistribute it and/or modify it
 // under the terms of the GNU General Public License as published by the Free
@@ -31,7 +31,7 @@ path_exists(const char *path)
 void
 create_file(const char *path, const char *content)
 {
-       FILE *f = fopen(path, "w");
+       FILE *f = fopen(path, "wb");
        if (!f || fputs(content, f) < 0) {
                fprintf(stderr, "create_file: %s: %s\n", path, strerror(errno));
        }