mirror of
https://github.com/NixOS/nix.git
synced 2025-12-11 19:41:04 +01:00
Tagging release 2.28.0
-----BEGIN PGP SIGNATURE----- iQFHBAABCAAxFiEEtUHVUwEnDgvPFcpdgXC0cm1xmN4FAmfv9fITHGVkb2xzdHJh QGdtYWlsLmNvbQAKCRCBcLRybXGY3ohrCAC1Uw/JJr3yEPlJ/jLc9t9HqEKMY08W W6SEjpYJHYixMXmoonexkqojncNWBaiytRa+vBY7JQq0xTOOBwj42TM2ZzMF4GXi vO4Ox0hEsRa/v7tSmK6GFz1sNEKEUOHDNbilg4kzkkBHPEGPUGMwdWkT0akO576Q SQ6ERwPPLsHDI2YtAeAD8R4p07CraiyA34ljDPz3rChTAXRPVKWxJUt1enwEWYTr cKk45RcR4S8rP1BVwf3wsNsrHjqjbaY45kPAo8GD79hFH0zkyJarS3Kgv8qsWLra 9ph0DVVG0wiArlET7Y3uchqtAC0Z5LOnutAmOFYFw6DKfWp9yGfl/SVW =XRda -----END PGP SIGNATURE----- Merge tag '2.28.0' into sync-2.28.0 Tagging release 2.28.0
This commit is contained in:
commit
852075ec9d
697 changed files with 4531 additions and 3970 deletions
|
|
@ -1,5 +1,5 @@
|
|||
#include "args.hh"
|
||||
#include "fs-sink.hh"
|
||||
#include "nix/util/args.hh"
|
||||
#include "nix/util/fs-sink.hh"
|
||||
#include <list>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#include "canon-path.hh"
|
||||
#include "nix/util/canon-path.hh"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@
|
|||
#include <rapidcheck/gtest.h>
|
||||
#include <rapidcheck/gen/Arbitrary.hpp>
|
||||
|
||||
#include <checked-arithmetic.hh>
|
||||
#include "nix/util/checked-arithmetic.hh"
|
||||
|
||||
#include "tests/gtest-with-params.hh"
|
||||
#include "nix/util/tests/gtest-with-params.hh"
|
||||
|
||||
namespace rc {
|
||||
using namespace nix;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#include "chunked-vector.hh"
|
||||
#include "nix/util/chunked-vector.hh"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#include "closure.hh"
|
||||
#include "nix/util/closure.hh"
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
namespace nix {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#include "compression.hh"
|
||||
#include "nix/util/compression.hh"
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
namespace nix {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include "config.hh"
|
||||
#include "args.hh"
|
||||
#include "nix/util/configuration.hh"
|
||||
#include "nix/util/args.hh"
|
||||
|
||||
#include <sstream>
|
||||
#include <gtest/gtest.h>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include <gtest/gtest.h>
|
||||
|
||||
#include "executable-path.hh"
|
||||
#include "nix/util/executable-path.hh"
|
||||
|
||||
namespace nix {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include <gtest/gtest.h>
|
||||
|
||||
#include "file-content-address.hh"
|
||||
#include "nix/util/file-content-address.hh"
|
||||
|
||||
namespace nix {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
#include "util.hh"
|
||||
#include "types.hh"
|
||||
#include "file-system.hh"
|
||||
#include "processes.hh"
|
||||
#include "terminal.hh"
|
||||
#include "strings.hh"
|
||||
#include "nix/util/util.hh"
|
||||
#include "nix/util/types.hh"
|
||||
#include "nix/util/file-system.hh"
|
||||
#include "nix/util/processes.hh"
|
||||
#include "nix/util/terminal.hh"
|
||||
#include "nix/util/strings.hh"
|
||||
|
||||
#include <limits.h>
|
||||
#include <gtest/gtest.h>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
#include <gtest/gtest.h>
|
||||
|
||||
#include "git.hh"
|
||||
#include "memory-source-accessor.hh"
|
||||
#include "nix/util/git.hh"
|
||||
#include "nix/util/memory-source-accessor.hh"
|
||||
|
||||
#include "tests/characterization.hh"
|
||||
#include "nix/util/tests/characterization.hh"
|
||||
|
||||
namespace nix {
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "hash.hh"
|
||||
#include "nix/util/hash.hh"
|
||||
|
||||
namespace nix {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#include "hilite.hh"
|
||||
#include "nix/util/hilite.hh"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "error.hh"
|
||||
#include "json-utils.hh"
|
||||
#include "nix/util/error.hh"
|
||||
#include "nix/util/json-utils.hh"
|
||||
|
||||
namespace nix {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#if 0
|
||||
|
||||
#include "logging.hh"
|
||||
#include "nixexpr.hh"
|
||||
#include "nix/util/logging.hh"
|
||||
#include "nix/expr/nixexpr.hh"
|
||||
#include <fstream>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#include "lru-cache.hh"
|
||||
#include "nix/util/lru-cache.hh"
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
namespace nix {
|
||||
|
|
|
|||
|
|
@ -32,12 +32,12 @@ deps_private += rapidcheck
|
|||
gtest = dependency('gtest', main : true)
|
||||
deps_private += gtest
|
||||
|
||||
add_project_arguments(
|
||||
# TODO(Qyriad): Yes this is how the autoconf+Make system did it.
|
||||
# It would be nice for our headers to be idempotent instead.
|
||||
'-include', 'config-util.hh',
|
||||
'-include', 'config-util.h',
|
||||
language : 'cpp',
|
||||
configdata = configuration_data()
|
||||
configdata.set_quoted('PACKAGE_VERSION', meson.project_version())
|
||||
|
||||
config_priv_h = configure_file(
|
||||
configuration : configdata,
|
||||
output : 'util-tests-config.hh',
|
||||
)
|
||||
|
||||
subdir('nix-meson-build-support/common')
|
||||
|
|
@ -79,6 +79,7 @@ include_dirs = [include_directories('.')]
|
|||
this_exe = executable(
|
||||
meson.project_name(),
|
||||
sources,
|
||||
config_priv_h,
|
||||
dependencies : deps_private_subproject + deps_private + deps_other,
|
||||
include_directories : include_dirs,
|
||||
# TODO: -lrapidcheck, see ../libutil-support/build.meson
|
||||
|
|
|
|||
|
|
@ -1,14 +1,16 @@
|
|||
#include "config-global.hh"
|
||||
#include "args.hh"
|
||||
#include "nix/util/config-global.hh"
|
||||
#include "nix/util/args.hh"
|
||||
#include "nix_api_util.h"
|
||||
#include "nix_api_util_internal.h"
|
||||
#include "tests/nix_api_util.hh"
|
||||
#include "tests/string_callback.hh"
|
||||
#include "nix/util/tests/nix_api_util.hh"
|
||||
#include "nix/util/tests/string_callback.hh"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "util-tests-config.hh"
|
||||
|
||||
namespace nixC {
|
||||
|
||||
TEST_F(nix_api_util_context, nix_context_error)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#include "pool.hh"
|
||||
#include "nix/util/pool.hh"
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
namespace nix {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include <gtest/gtest.h>
|
||||
|
||||
#include "position.hh"
|
||||
#include "nix/util/position.hh"
|
||||
|
||||
namespace nix {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#include "processes.hh"
|
||||
#include "nix/util/processes.hh"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#include "references.hh"
|
||||
#include "nix/util/references.hh"
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
namespace nix {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include <gtest/gtest.h>
|
||||
|
||||
#include "processes.hh"
|
||||
#include "nix/util/processes.hh"
|
||||
|
||||
namespace nix {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
#include <gtest/gtest.h>
|
||||
#include <rapidcheck/gtest.h>
|
||||
|
||||
#include "strings.hh"
|
||||
#include "error.hh"
|
||||
#include "nix/util/strings.hh"
|
||||
#include "nix/util/error.hh"
|
||||
|
||||
namespace nix {
|
||||
|
||||
|
|
@ -80,6 +80,42 @@ TEST(concatStringsSep, buildSingleString)
|
|||
ASSERT_EQ(concatStringsSep(",", strings), "this");
|
||||
}
|
||||
|
||||
TEST(concatMapStringsSep, empty)
|
||||
{
|
||||
Strings strings;
|
||||
|
||||
ASSERT_EQ(concatMapStringsSep(",", strings, [](const std::string & s) { return s; }), "");
|
||||
}
|
||||
|
||||
TEST(concatMapStringsSep, justOne)
|
||||
{
|
||||
Strings strings;
|
||||
strings.push_back("this");
|
||||
|
||||
ASSERT_EQ(concatMapStringsSep(",", strings, [](const std::string & s) { return s; }), "this");
|
||||
}
|
||||
|
||||
TEST(concatMapStringsSep, two)
|
||||
{
|
||||
Strings strings;
|
||||
strings.push_back("this");
|
||||
strings.push_back("that");
|
||||
|
||||
ASSERT_EQ(concatMapStringsSep(",", strings, [](const std::string & s) { return s; }), "this,that");
|
||||
}
|
||||
|
||||
TEST(concatMapStringsSep, map)
|
||||
{
|
||||
std::map<std::string, std::string> strings;
|
||||
strings["this"] = "that";
|
||||
strings["1"] = "one";
|
||||
|
||||
ASSERT_EQ(
|
||||
concatMapStringsSep(
|
||||
", ", strings, [](const std::pair<std::string, std::string> & s) { return s.first + " -> " + s.second; }),
|
||||
"1 -> one, this -> that");
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* dropEmptyInitThenConcatStringsSep
|
||||
* --------------------------------------------------------------------------*/
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#include "suggestions.hh"
|
||||
#include "nix/util/suggestions.hh"
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
namespace nix {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#include "util.hh"
|
||||
#include "types.hh"
|
||||
#include "terminal.hh"
|
||||
#include "strings.hh"
|
||||
#include "nix/util/util.hh"
|
||||
#include "nix/util/types.hh"
|
||||
#include "nix/util/terminal.hh"
|
||||
#include "nix/util/strings.hh"
|
||||
|
||||
#include <limits.h>
|
||||
#include <gtest/gtest.h>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#include "url.hh"
|
||||
#include "nix/util/url.hh"
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
namespace nix {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
#include "util.hh"
|
||||
#include "types.hh"
|
||||
#include "file-system.hh"
|
||||
#include "terminal.hh"
|
||||
#include "strings.hh"
|
||||
#include "nix/util/util.hh"
|
||||
#include "nix/util/types.hh"
|
||||
#include "nix/util/file-system.hh"
|
||||
#include "nix/util/terminal.hh"
|
||||
#include "nix/util/strings.hh"
|
||||
|
||||
#include <limits.h>
|
||||
#include <gtest/gtest.h>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#include "xml-writer.hh"
|
||||
#include "nix/util/xml-writer.hh"
|
||||
#include <gtest/gtest.h>
|
||||
#include <sstream>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue