mirror of
https://github.com/NixOS/nix
synced 2025-06-24 22:11:15 +02:00
tweak url parsing; add test case
This commit is contained in:
parent
4bdfeab5f4
commit
741a54df8f
129 changed files with 910 additions and 99 deletions
|
@ -77,7 +77,7 @@ TEST_F(GitUtilsTest, sink_basic)
|
|||
|
||||
// sink->createHardlink("foo-1.1/links/foo-2", CanonPath("foo-1.1/hello"));
|
||||
|
||||
auto result = repo->dereferenceSingletonDirectory(sink->sync());
|
||||
auto result = repo->dereferenceSingletonDirectory(sink->flush());
|
||||
auto accessor = repo->getAccessor(result, false, false);
|
||||
auto entries = accessor->readDirectory(CanonPath::root);
|
||||
ASSERT_EQ(entries.size(), 5);
|
||||
|
|
|
@ -7,12 +7,14 @@
|
|||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <regex>
|
||||
#include <sstream>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
|
||||
#include "serialise.hh"
|
||||
#include "processes.hh"
|
||||
#include "url.hh"
|
||||
|
||||
|
||||
namespace fs = std::filesystem;
|
||||
|
@ -58,6 +60,8 @@ struct Fetch {
|
|||
std::vector<nlohmann::json> fetchUrls(const std::vector<Md> &metadatas) const;
|
||||
};
|
||||
|
||||
// check if `path` has attribute corresponding to the `pattern`
|
||||
// TODO replace this with libgit2 pathspec?
|
||||
bool matchesPattern(std::string_view path, std::string_view pattern) {
|
||||
if (pattern.ends_with("/**")) {
|
||||
auto prefix = pattern.substr(0, pattern.length() - 3);
|
||||
|
@ -68,7 +72,6 @@ bool matchesPattern(std::string_view path, std::string_view pattern) {
|
|||
|
||||
while (patternPos < pattern.length() && pathPos < path.length()) {
|
||||
if (pattern[patternPos] == '*') {
|
||||
// For "*.ext" pattern, match against end of path
|
||||
if (patternPos == 0 && pattern.find('*', 1) == std::string_view::npos) {
|
||||
return path.ends_with(pattern.substr(1));
|
||||
}
|
||||
|
@ -91,12 +94,7 @@ bool matchesPattern(std::string_view path, std::string_view pattern) {
|
|||
static size_t writeCallback(void *contents, size_t size, size_t nmemb,
|
||||
std::string *s) {
|
||||
size_t newLength = size * nmemb;
|
||||
try {
|
||||
s->append((char *)contents, newLength);
|
||||
} catch (std::bad_alloc &e) {
|
||||
// Handle memory bad_alloc error
|
||||
return 0;
|
||||
}
|
||||
s->append((char *)contents, newLength);
|
||||
return newLength;
|
||||
}
|
||||
|
||||
|
@ -104,22 +102,18 @@ struct SinkCallbackData {
|
|||
Sink* sink;
|
||||
std::string_view sha256Expected;
|
||||
HashSink hashSink;
|
||||
|
||||
SinkCallbackData(Sink* sink, std::string_view sha256)
|
||||
|
||||
SinkCallbackData(Sink* sink, std::string_view sha256)
|
||||
: sink(sink)
|
||||
, sha256Expected(sha256)
|
||||
, hashSink(HashAlgorithm::SHA256)
|
||||
, hashSink(HashAlgorithm::SHA256)
|
||||
{}
|
||||
};
|
||||
|
||||
static size_t sinkWriteCallback(void *contents, size_t size, size_t nmemb, SinkCallbackData *data) {
|
||||
size_t totalSize = size * nmemb;
|
||||
try {
|
||||
data->hashSink({(char *)contents, totalSize});
|
||||
(*data->sink)({(char *)contents, totalSize});
|
||||
} catch (std::exception &e) {
|
||||
return 0;
|
||||
}
|
||||
data->hashSink({(char *)contents, totalSize});
|
||||
(*data->sink)({(char *)contents, totalSize});
|
||||
return totalSize;
|
||||
}
|
||||
|
||||
|
@ -130,7 +124,7 @@ void downloadToSink(const std::string &url, const std::string &authHeader, Sink
|
|||
curl = curl_easy_init();
|
||||
if (curl) {
|
||||
SinkCallbackData data(&sink, sha256Expected);
|
||||
|
||||
|
||||
curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, sinkWriteCallback);
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &data);
|
||||
|
@ -220,11 +214,9 @@ std::vector<AttrRule> parseGitAttrFile(std::string_view content)
|
|||
pos = eol + 1;
|
||||
}
|
||||
|
||||
// Trim carriage return if present
|
||||
if (!line.empty() && line.back() == '\r')
|
||||
line.remove_suffix(1);
|
||||
|
||||
// Skip empty lines and comments
|
||||
if (line.empty() || line[0] == '#')
|
||||
continue;
|
||||
|
||||
|
@ -246,11 +238,16 @@ std::string getLfsApiToken(const std::string &host,
|
|||
.args = {"git@" + host, "git-lfs-authenticate", path, "download"},
|
||||
});
|
||||
|
||||
std::string res;
|
||||
if (!output.empty()) {
|
||||
nlohmann::json query_resp = nlohmann::json::parse(output);
|
||||
res = query_resp["header"]["Authorization"].get<std::string>();
|
||||
}
|
||||
if (output.empty())
|
||||
throw std::runtime_error("git-lfs-authenticate: no output (cmd: ssh git@" + host + " git-lfs-authenticate " + path + " download)");
|
||||
|
||||
nlohmann::json query_resp = nlohmann::json::parse(output);
|
||||
if (!query_resp.contains("header"))
|
||||
throw std::runtime_error("no header in git-lfs-authenticate response");
|
||||
if (!query_resp["header"].contains("Authorization"))
|
||||
throw std::runtime_error("no Authorization in git-lfs-authenticate response");
|
||||
|
||||
std::string res = query_resp["header"]["Authorization"].get<std::string>();
|
||||
|
||||
return res;
|
||||
}
|
||||
|
@ -260,43 +257,18 @@ std::string getLfsEndpointUrl(git_repository *repo) {
|
|||
git_remote* remote = NULL;
|
||||
err = git_remote_lookup(&remote, repo, "origin");
|
||||
if (err < 0) {
|
||||
std::cerr << " failed git_remote_lookup with: " << err << std::endl;
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
const char *url_c_str = git_remote_url(remote);
|
||||
if (!url_c_str) {
|
||||
std::cerr << "no remote url ";
|
||||
return "";
|
||||
}
|
||||
|
||||
return std::string(url_c_str);
|
||||
}
|
||||
|
||||
// splits url into (hostname, path)
|
||||
std::tuple<std::string, std::string> splitUrl(const std::string& url_in) {
|
||||
CURLU *url = curl_url();
|
||||
|
||||
if (curl_url_set(url, CURLUPART_URL, url_in.c_str(), 0) != CURLUE_OK) {
|
||||
std::cerr << "Failed to set URL\n";
|
||||
return {"", ""};
|
||||
}
|
||||
|
||||
char *hostname;
|
||||
char *path;
|
||||
|
||||
if (curl_url_get(url, CURLUPART_HOST, &hostname, 0) != CURLUE_OK) {
|
||||
std::cerr << "no hostname" << std::endl;
|
||||
}
|
||||
|
||||
if (curl_url_get(url, CURLUPART_PATH, &path, 0) != CURLUE_OK) {
|
||||
std::cerr << "no path" << std::endl;
|
||||
}
|
||||
|
||||
return std::make_tuple(std::string(hostname), std::string(path));
|
||||
}
|
||||
|
||||
std::string git_attr_value_to_string(git_attr_value_t value) {
|
||||
switch (value) {
|
||||
case GIT_ATTR_VALUE_UNSPECIFIED:
|
||||
|
@ -312,35 +284,6 @@ std::string git_attr_value_to_string(git_attr_value_t value) {
|
|||
}
|
||||
}
|
||||
|
||||
std::unique_ptr<std::vector<std::string>> find_lfs_files(git_repository *repo) {
|
||||
git_index *index;
|
||||
int error;
|
||||
error = git_repository_index(&index, repo);
|
||||
if (error < 0) {
|
||||
const git_error *e = git_error_last();
|
||||
std::cerr << "Error reading index: " << e->message << std::endl;
|
||||
git_repository_free(repo);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::unique_ptr<std::vector<std::string>> out =
|
||||
std::make_unique<std::vector<std::string>>();
|
||||
size_t entry_count = git_index_entrycount(index);
|
||||
for (size_t i = 0; i < entry_count; ++i) {
|
||||
const git_index_entry *entry = git_index_get_byindex(index, i);
|
||||
if (entry) {
|
||||
const char *value;
|
||||
if (git_attr_get(&value, repo, GIT_ATTR_CHECK_INDEX_ONLY, entry->path,
|
||||
"filter") == 0) {
|
||||
auto value_type = git_attr_value(value);
|
||||
if (value_type == GIT_ATTR_VALUE_STRING && strcmp(value, "lfs") == 0) {
|
||||
out->push_back(entry->path);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
Md parseLfsMetadata(const std::string &content, const std::string &filename) {
|
||||
// example git-lfs poitner file:
|
||||
|
@ -371,22 +314,42 @@ Md parseLfsMetadata(const std::string &content, const std::string &filename) {
|
|||
return Md{filename, oid, size};
|
||||
}
|
||||
|
||||
// there's already a ParseURL here https://github.com/b-camacho/nix/blob/ef6fa54e05cd4134ec41b0d64c1a16db46237f83/src/libutil/url.cc#L13
|
||||
// but that one doesn't handle the `git@` prefix that libgit2 sometimes returns for a git remote
|
||||
// (one would think fixGitURL is for that? but it doesn't handle a scheme prefix)
|
||||
std::tuple<std::string, std::string, std::string, std::string, std::string> parseGitRemoteUrl(const std::string& url) {
|
||||
std::regex pattern(R"((\w+)://(\w+@)?([^/]+)(:\d{1,5})?/(.*))");
|
||||
std::smatch matches;
|
||||
|
||||
if (std::regex_search(url, matches, pattern)) {
|
||||
return {
|
||||
matches[1].str(), // scheme
|
||||
matches[2].str(), // optional "git@" part idk the name
|
||||
matches[3].str(), // domain
|
||||
matches[4].str(), // port
|
||||
matches[5].str(), // path
|
||||
};
|
||||
}
|
||||
|
||||
return {"", "", "", "", ""};
|
||||
}
|
||||
|
||||
void Fetch::init(git_repository* repo, std::string gitattributesContent) {
|
||||
this->rootUrl = lfs::getLfsEndpointUrl(repo);
|
||||
const auto [host, path] = lfs::splitUrl(rootUrl);
|
||||
this->token = lfs::getLfsApiToken(host, path);
|
||||
const auto remoteUrl = lfs::getLfsEndpointUrl(repo);
|
||||
|
||||
const auto [scheme, maybeSshUser, domain, port, path] = parseGitRemoteUrl(remoteUrl);
|
||||
this->rootUrl = (scheme == "ssh" ? "https" : scheme) + "://" + domain + port + "/" + path;
|
||||
this->token = lfs::getLfsApiToken(domain, path);
|
||||
this->rules = lfs::parseGitAttrFile(gitattributesContent);
|
||||
this->ready = true;
|
||||
}
|
||||
|
||||
bool Fetch::hasAttribute(const std::string& path, const std::string& attrName) const
|
||||
{
|
||||
// Iterate rules in reverse order (last matching rule wins)
|
||||
for (auto it = rules.rbegin(); it != rules.rend(); ++it) {
|
||||
if (matchesPattern(path, it->pattern)) {
|
||||
auto attr = it->attributes.find(attrName);
|
||||
if (attr != it->attributes.end()) {
|
||||
// Found a matching rule with this attribute
|
||||
return attr->second != "false";
|
||||
}
|
||||
}
|
||||
|
@ -416,6 +379,8 @@ std::vector<nlohmann::json> Fetch::fetchUrls(const std::vector<Md> &metadatas) c
|
|||
auto lfsUrlBatch = rootUrl + "/info/lfs/objects/batch";
|
||||
curl_easy_setopt(curl, CURLOPT_URL, lfsUrlBatch.c_str());
|
||||
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, dataStr.c_str());
|
||||
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
|
||||
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
|
||||
|
||||
struct curl_slist *headers = NULL;
|
||||
auto authHeader = "Authorization: " + token;
|
||||
|
@ -440,6 +405,7 @@ std::vector<nlohmann::json> Fetch::fetchUrls(const std::vector<Md> &metadatas) c
|
|||
// example resp here:
|
||||
// {"objects":[{"oid":"f5e02aa71e67f41d79023a128ca35bad86cf7b6656967bfe0884b3a3c4325eaf","size":10000000,"actions":{"download":{"href":"https://gitlab.com/b-camacho/test-lfs.git/gitlab-lfs/objects/f5e02aa71e67f41d79023a128ca35bad86cf7b6656967bfe0884b3a3c4325eaf","header":{"Authorization":"Basic
|
||||
// Yi1jYW1hY2hvOmV5SjBlWEFpT2lKS1YxUWlMQ0poYkdjaU9pSklVekkxTmlKOS5leUprWVhSaElqcDdJbUZqZEc5eUlqb2lZaTFqWVcxaFkyaHZJbjBzSW1wMGFTSTZJbUptTURZNFpXVTFMVEprWmpVdE5HWm1ZUzFpWWpRMExUSXpNVEV3WVRReU1qWmtaaUlzSW1saGRDSTZNVGN4TkRZeE16ZzBOU3dpYm1KbUlqb3hOekUwTmpFek9EUXdMQ0psZUhBaU9qRTNNVFEyTWpFd05EVjkuZk9yMDNkYjBWSTFXQzFZaTBKRmJUNnJTTHJPZlBwVW9lYllkT0NQZlJ4QQ=="}}},"authenticated":true}]}
|
||||
|
||||
auto resp = nlohmann::json::parse(responseString);
|
||||
if (resp.contains("objects")) {
|
||||
objects.insert(objects.end(), resp["objects"].begin(),
|
||||
|
@ -470,4 +436,5 @@ void Fetch::fetch(const std::string& pointerFileContents, const std::string& poi
|
|||
|
||||
} // namespace lfs
|
||||
|
||||
} // namespace nix
|
||||
} // namespace nix
|
||||
|
||||
|
|
|
@ -676,9 +676,9 @@ struct GitSourceAccessor : SourceAccessor
|
|||
|
||||
std::string readBlob(const CanonPath & path, bool symlink)
|
||||
{
|
||||
auto blob = getBlob(path, symlink);
|
||||
const auto blob = getBlob(path, symlink);
|
||||
|
||||
auto data = std::string((const char *) git_blob_rawcontent(blob.get()), git_blob_rawsize(blob.get()));
|
||||
const auto data = std::string((const char *) git_blob_rawcontent(blob.get()), git_blob_rawsize(blob.get()));
|
||||
|
||||
if (path != CanonPath(".gitattributes") && lfsFetch) {
|
||||
auto& _lfsFetch = *lfsFetch;
|
||||
|
@ -704,19 +704,24 @@ struct GitSourceAccessor : SourceAccessor
|
|||
auto size = git_blob_rawsize(blob.get());
|
||||
sizeCallback(size);
|
||||
|
||||
auto pointerFileContents = std::string((const char *) git_blob_rawcontent(blob.get()), size);
|
||||
// if lfs, this is just a pointer file
|
||||
// if not lfs then it's not big either way
|
||||
auto contents = std::string((const char *) git_blob_rawcontent(blob.get()), size);
|
||||
|
||||
if (path != CanonPath(".gitattributes") && lfsFetch) {
|
||||
if (lfsFetch && path != CanonPath(".gitattributes")) {
|
||||
auto& _lfsFetch = *lfsFetch;
|
||||
if (!_lfsFetch.ready) {
|
||||
const auto contents = readFile(CanonPath(".gitattributes"));
|
||||
_lfsFetch.init(*repo, contents);
|
||||
}
|
||||
if (_lfsFetch.hasAttribute(path.abs(), "filter")) {
|
||||
_lfsFetch.fetch(pointerFileContents, path.abs(), sink);
|
||||
_lfsFetch.fetch(contents, path.abs(), sink);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// either not using lfs or file should not be smudged
|
||||
sink(contents);
|
||||
}
|
||||
|
||||
std::string readFile(const CanonPath & path) override
|
||||
|
@ -897,7 +902,6 @@ struct GitSourceAccessor : SourceAccessor
|
|||
return tree;
|
||||
}
|
||||
|
||||
|
||||
Blob getBlob(const CanonPath & path, bool expectSymlink)
|
||||
{
|
||||
if (!expectSymlink && git_object_type(root.get()) == GIT_OBJECT_BLOB)
|
||||
|
@ -916,7 +920,6 @@ struct GitSourceAccessor : SourceAccessor
|
|||
|
||||
auto entry = need(path);
|
||||
|
||||
|
||||
if (git_tree_entry_type(entry) != GIT_OBJECT_BLOB)
|
||||
notExpected();
|
||||
|
||||
|
@ -938,7 +941,6 @@ struct GitSourceAccessor : SourceAccessor
|
|||
};
|
||||
|
||||
struct GitExportIgnoreSourceAccessor : CachingFilteringSourceAccessor {
|
||||
|
||||
ref<GitRepoImpl> repo;
|
||||
std::optional<Hash> rev;
|
||||
|
||||
|
|
|
@ -678,10 +678,6 @@ struct GitInputScheme : InputScheme
|
|||
}
|
||||
}
|
||||
|
||||
if (getLfsAttr(input)) {
|
||||
printTalkative("lfs=1 on %s", input.to_string());
|
||||
}
|
||||
|
||||
assert(!origRev || origRev == rev);
|
||||
if (!getShallowAttr(input))
|
||||
input.attrs.insert_or_assign("revCount", getIntAttr(infoAttrs, "revCount"));
|
||||
|
@ -807,7 +803,7 @@ struct GitInputScheme : InputScheme
|
|||
std::optional<std::string> getFingerprint(ref<Store> store, const Input & input) const override
|
||||
{
|
||||
if (auto rev = input.getRev())
|
||||
return rev->gitRev() + (getSubmodulesAttr(input) ? ";s" : "") + (getExportIgnoreAttr(input) ? ";e" : "");
|
||||
return rev->gitRev() + (getSubmodulesAttr(input) ? ";s" : "") + (getExportIgnoreAttr(input) ? ";e" : "") + (getLfsAttr(input) ? ";l" : "");
|
||||
else
|
||||
return std::nullopt;
|
||||
}
|
||||
|
|
27
tests/ca/config.nix
Normal file
27
tests/ca/config.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
let
|
||||
contentAddressedByDefault = builtins.getEnv "NIX_TESTS_CA_BY_DEFAULT" == "1";
|
||||
caArgs = if contentAddressedByDefault then {
|
||||
__contentAddressed = true;
|
||||
outputHashMode = "recursive";
|
||||
outputHashAlgo = "sha256";
|
||||
} else {};
|
||||
in
|
||||
|
||||
rec {
|
||||
shell = "/nix/store/dsd5gz46hdbdk2rfdimqddhq6m8m8fqs-bash-5.1-p16/bin/bash";
|
||||
|
||||
path = "/nix/store/a7gvj343m05j2s32xcnwr35v31ynlypr-coreutils-9.1/bin";
|
||||
|
||||
system = "x86_64-linux";
|
||||
|
||||
shared = builtins.getEnv "_NIX_TEST_SHARED";
|
||||
|
||||
mkDerivation = args:
|
||||
derivation ({
|
||||
inherit system;
|
||||
builder = shell;
|
||||
args = ["-e" args.builder or (builtins.toFile "builder-${args.name}.sh" "if [ -e .attrs.sh ]; then source .attrs.sh; fi; eval \"$buildCommand\"")];
|
||||
PATH = path;
|
||||
} // caArgs // removeAttrs args ["builder" "meta"])
|
||||
// { meta = args.meta or {}; };
|
||||
}
|
269
tests/common/vars-and-functions.sh
Normal file
269
tests/common/vars-and-functions.sh
Normal file
|
@ -0,0 +1,269 @@
|
|||
set -eu -o pipefail
|
||||
|
||||
if [[ -z "${COMMON_VARS_AND_FUNCTIONS_SH_SOURCED-}" ]]; then
|
||||
|
||||
COMMON_VARS_AND_FUNCTIONS_SH_SOURCED=1
|
||||
|
||||
export PS4='+(${BASH_SOURCE[0]}:$LINENO) '
|
||||
|
||||
export TEST_ROOT=$(realpath ${TMPDIR:-/tmp}/nix-test)/${TEST_NAME:-default}
|
||||
export NIX_STORE_DIR
|
||||
if ! NIX_STORE_DIR=$(readlink -f $TEST_ROOT/store 2> /dev/null); then
|
||||
# Maybe the build directory is symlinked.
|
||||
export NIX_IGNORE_SYMLINK_STORE=1
|
||||
NIX_STORE_DIR=$TEST_ROOT/store
|
||||
fi
|
||||
export NIX_LOCALSTATE_DIR=$TEST_ROOT/var
|
||||
export NIX_LOG_DIR=$TEST_ROOT/var/log/nix
|
||||
export NIX_STATE_DIR=$TEST_ROOT/var/nix
|
||||
export NIX_CONF_DIR=$TEST_ROOT/etc
|
||||
export NIX_DAEMON_SOCKET_PATH=$TEST_ROOT/dSocket
|
||||
unset NIX_USER_CONF_FILES
|
||||
export _NIX_TEST_SHARED=$TEST_ROOT/shared
|
||||
if [[ -n $NIX_STORE ]]; then
|
||||
export _NIX_TEST_NO_SANDBOX=1
|
||||
fi
|
||||
export _NIX_IN_TEST=$TEST_ROOT/shared
|
||||
export _NIX_TEST_NO_LSOF=1
|
||||
export NIX_REMOTE=${NIX_REMOTE_-}
|
||||
unset NIX_PATH
|
||||
export TEST_HOME=$TEST_ROOT/test-home
|
||||
export HOME=$TEST_HOME
|
||||
unset XDG_STATE_HOME
|
||||
unset XDG_DATA_HOME
|
||||
unset XDG_CONFIG_HOME
|
||||
unset XDG_CONFIG_DIRS
|
||||
unset XDG_CACHE_HOME
|
||||
mkdir -p $TEST_HOME
|
||||
|
||||
export PATH=/home/bmc/sources/nix/outputs/out/bin:$PATH
|
||||
if [[ -n "${NIX_CLIENT_PACKAGE:-}" ]]; then
|
||||
export PATH="$NIX_CLIENT_PACKAGE/bin":$PATH
|
||||
fi
|
||||
DAEMON_PATH="$PATH"
|
||||
if [[ -n "${NIX_DAEMON_PACKAGE:-}" ]]; then
|
||||
DAEMON_PATH="${NIX_DAEMON_PACKAGE}/bin:$DAEMON_PATH"
|
||||
fi
|
||||
coreutils=/nix/store/a7gvj343m05j2s32xcnwr35v31ynlypr-coreutils-9.1/bin
|
||||
|
||||
export dot=
|
||||
export SHELL="/nix/store/dsd5gz46hdbdk2rfdimqddhq6m8m8fqs-bash-5.1-p16/bin/bash"
|
||||
export PAGER=cat
|
||||
export busybox="/nix/store/7b943a2k4amjmam6dnwnxnj8qbba9lbq-busybox-static-x86_64-unknown-linux-musl-1.35.0/bin/busybox"
|
||||
|
||||
export version=2.15.0
|
||||
export system=x86_64-linux
|
||||
|
||||
export BUILD_SHARED_LIBS=1
|
||||
|
||||
export IMPURE_VAR1=foo
|
||||
export IMPURE_VAR2=bar
|
||||
|
||||
cacheDir=$TEST_ROOT/binary-cache
|
||||
|
||||
readLink() {
|
||||
ls -l "$1" | sed 's/.*->\ //'
|
||||
}
|
||||
|
||||
clearProfiles() {
|
||||
profiles="$HOME"/.local/state/nix/profiles
|
||||
rm -rf "$profiles"
|
||||
}
|
||||
|
||||
clearStore() {
|
||||
echo "clearing store..."
|
||||
chmod -R +w "$NIX_STORE_DIR"
|
||||
rm -rf "$NIX_STORE_DIR"
|
||||
mkdir "$NIX_STORE_DIR"
|
||||
rm -rf "$NIX_STATE_DIR"
|
||||
mkdir "$NIX_STATE_DIR"
|
||||
clearProfiles
|
||||
}
|
||||
|
||||
clearCache() {
|
||||
rm -rf "$cacheDir"
|
||||
}
|
||||
|
||||
clearCacheCache() {
|
||||
rm -f $TEST_HOME/.cache/nix/binary-cache*
|
||||
}
|
||||
|
||||
startDaemon() {
|
||||
# Don’t start the daemon twice, as this would just make it loop indefinitely
|
||||
if [[ "${_NIX_TEST_DAEMON_PID-}" != '' ]]; then
|
||||
return
|
||||
fi
|
||||
# Start the daemon, wait for the socket to appear.
|
||||
rm -f $NIX_DAEMON_SOCKET_PATH
|
||||
PATH=$DAEMON_PATH nix-daemon &
|
||||
_NIX_TEST_DAEMON_PID=$!
|
||||
export _NIX_TEST_DAEMON_PID
|
||||
for ((i = 0; i < 300; i++)); do
|
||||
if [[ -S $NIX_DAEMON_SOCKET_PATH ]]; then
|
||||
DAEMON_STARTED=1
|
||||
break;
|
||||
fi
|
||||
sleep 0.1
|
||||
done
|
||||
if [[ -z ${DAEMON_STARTED+x} ]]; then
|
||||
fail "Didn’t manage to start the daemon"
|
||||
fi
|
||||
trap "killDaemon" EXIT
|
||||
# Save for if daemon is killed
|
||||
NIX_REMOTE_OLD=$NIX_REMOTE
|
||||
export NIX_REMOTE=daemon
|
||||
}
|
||||
|
||||
killDaemon() {
|
||||
# Don’t fail trying to stop a non-existant daemon twice
|
||||
if [[ "${_NIX_TEST_DAEMON_PID-}" == '' ]]; then
|
||||
return
|
||||
fi
|
||||
kill $_NIX_TEST_DAEMON_PID
|
||||
for i in {0..100}; do
|
||||
kill -0 $_NIX_TEST_DAEMON_PID 2> /dev/null || break
|
||||
sleep 0.1
|
||||
done
|
||||
kill -9 $_NIX_TEST_DAEMON_PID 2> /dev/null || true
|
||||
wait $_NIX_TEST_DAEMON_PID || true
|
||||
rm -f $NIX_DAEMON_SOCKET_PATH
|
||||
# Indicate daemon is stopped
|
||||
unset _NIX_TEST_DAEMON_PID
|
||||
# Restore old nix remote
|
||||
NIX_REMOTE=$NIX_REMOTE_OLD
|
||||
trap "" EXIT
|
||||
}
|
||||
|
||||
restartDaemon() {
|
||||
[[ -z "${_NIX_TEST_DAEMON_PID:-}" ]] && return 0
|
||||
|
||||
killDaemon
|
||||
startDaemon
|
||||
}
|
||||
|
||||
if [[ $(uname) == Linux ]] && [[ -L /proc/self/ns/user ]] && unshare --user true; then
|
||||
_canUseSandbox=1
|
||||
fi
|
||||
|
||||
isDaemonNewer () {
|
||||
[[ -n "${NIX_DAEMON_PACKAGE:-}" ]] || return 0
|
||||
local requiredVersion="$1"
|
||||
local daemonVersion=$($NIX_DAEMON_PACKAGE/bin/nix-daemon --version | cut -d' ' -f3)
|
||||
[[ $(nix eval --expr "builtins.compareVersions ''$daemonVersion'' ''$requiredVersion''") -ge 0 ]]
|
||||
}
|
||||
|
||||
requireDaemonNewerThan () {
|
||||
isDaemonNewer "$1" || exit 99
|
||||
}
|
||||
|
||||
canUseSandbox() {
|
||||
if [[ ! ${_canUseSandbox-} ]]; then
|
||||
echo "Sandboxing not supported, skipping this test..."
|
||||
return 1
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
fail() {
|
||||
echo "$1"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Run a command failing if it didn't exit with the expected exit code.
|
||||
#
|
||||
# Has two advantages over the built-in `!`:
|
||||
#
|
||||
# 1. `!` conflates all non-0 codes. `expect` allows testing for an exact
|
||||
# code.
|
||||
#
|
||||
# 2. `!` unexpectedly negates `set -e`, and cannot be used on individual
|
||||
# pipeline stages with `set -o pipefail`. It only works on the entire
|
||||
# pipeline, which is useless if we want, say, `nix ...` invocation to
|
||||
# *fail*, but a grep on the error message it outputs to *succeed*.
|
||||
expect() {
|
||||
local expected res
|
||||
expected="$1"
|
||||
shift
|
||||
"$@" && res=0 || res="$?"
|
||||
if [[ $res -ne $expected ]]; then
|
||||
echo "Expected '$expected' but got '$res' while running '${*@Q}'" >&2
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
# Better than just doing `expect ... >&2` because the "Expected..."
|
||||
# message below will *not* be redirected.
|
||||
expectStderr() {
|
||||
local expected res
|
||||
expected="$1"
|
||||
shift
|
||||
"$@" 2>&1 && res=0 || res="$?"
|
||||
if [[ $res -ne $expected ]]; then
|
||||
echo "Expected '$expected' but got '$res' while running '${*@Q}'" >&2
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
needLocalStore() {
|
||||
if [[ "$NIX_REMOTE" == "daemon" ]]; then
|
||||
echo "Can’t run through the daemon ($1), skipping this test..."
|
||||
return 99
|
||||
fi
|
||||
}
|
||||
|
||||
# Just to make it easy to find which tests should be fixed
|
||||
buggyNeedLocalStore() {
|
||||
needLocalStore "$1"
|
||||
}
|
||||
|
||||
enableFeatures() {
|
||||
local features="$1"
|
||||
sed -i 's/experimental-features .*/& '"$features"'/' "$NIX_CONF_DIR"/nix.conf
|
||||
}
|
||||
|
||||
set -x
|
||||
|
||||
onError() {
|
||||
set +x
|
||||
echo "$0: test failed at:" >&2
|
||||
for ((i = 1; i < ${#BASH_SOURCE[@]}; i++)); do
|
||||
if [[ -z ${BASH_SOURCE[i]} ]]; then break; fi
|
||||
echo " ${FUNCNAME[i]} in ${BASH_SOURCE[i]}:${BASH_LINENO[i-1]}" >&2
|
||||
done
|
||||
}
|
||||
|
||||
# `grep -v` doesn't work well for exit codes. We want `!(exist line l. l
|
||||
# matches)`. It gives us `exist line l. !(l matches)`.
|
||||
#
|
||||
# `!` normally doesn't work well with `set -e`, but when we wrap in a
|
||||
# function it *does*.
|
||||
grepInverse() {
|
||||
! grep "$@"
|
||||
}
|
||||
|
||||
# A shorthand, `> /dev/null` is a bit noisy.
|
||||
#
|
||||
# `grep -q` would seem to do this, no function necessary, but it is a
|
||||
# bad fit with pipes and `set -o pipefail`: `-q` will exit after the
|
||||
# first match, and then subsequent writes will result in broken pipes.
|
||||
#
|
||||
# Note that reproducing the above is a bit tricky as it depends on
|
||||
# non-deterministic properties such as the timing between the match and
|
||||
# the closing of the pipe, the buffering of the pipe, and the speed of
|
||||
# the producer into the pipe. But rest assured we've seen it happen in
|
||||
# CI reliably.
|
||||
grepQuiet() {
|
||||
grep "$@" > /dev/null
|
||||
}
|
||||
|
||||
# The previous two, combined
|
||||
grepQuietInverse() {
|
||||
! grep "$@" > /dev/null
|
||||
}
|
||||
|
||||
trap onError ERR
|
||||
|
||||
fi # COMMON_VARS_AND_FUNCTIONS_SH_SOURCED
|
27
tests/config.nix
Normal file
27
tests/config.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
let
|
||||
contentAddressedByDefault = builtins.getEnv "NIX_TESTS_CA_BY_DEFAULT" == "1";
|
||||
caArgs = if contentAddressedByDefault then {
|
||||
__contentAddressed = true;
|
||||
outputHashMode = "recursive";
|
||||
outputHashAlgo = "sha256";
|
||||
} else {};
|
||||
in
|
||||
|
||||
rec {
|
||||
shell = "/nix/store/dsd5gz46hdbdk2rfdimqddhq6m8m8fqs-bash-5.1-p16/bin/bash";
|
||||
|
||||
path = "/nix/store/a7gvj343m05j2s32xcnwr35v31ynlypr-coreutils-9.1/bin";
|
||||
|
||||
system = "x86_64-linux";
|
||||
|
||||
shared = builtins.getEnv "_NIX_TEST_SHARED";
|
||||
|
||||
mkDerivation = args:
|
||||
derivation ({
|
||||
inherit system;
|
||||
builder = shell;
|
||||
args = ["-e" args.builder or (builtins.toFile "builder-${args.name}.sh" "if [ -e .attrs.sh ]; then source .attrs.sh; fi; eval \"$buildCommand\"")];
|
||||
PATH = path;
|
||||
} // caArgs // removeAttrs args ["builder" "meta"])
|
||||
// { meta = args.meta or {}; };
|
||||
}
|
1
tests/lang/eval-okay-any-all.out
Normal file
1
tests/lang/eval-okay-any-all.out
Normal file
|
@ -0,0 +1 @@
|
|||
[ false false true true true true false true ]
|
1
tests/lang/eval-okay-arithmetic.out
Normal file
1
tests/lang/eval-okay-arithmetic.out
Normal file
|
@ -0,0 +1 @@
|
|||
2216
|
1
tests/lang/eval-okay-attrnames.out
Normal file
1
tests/lang/eval-okay-attrnames.out
Normal file
|
@ -0,0 +1 @@
|
|||
"newxfoonewxy"
|
1
tests/lang/eval-okay-attrs.out
Normal file
1
tests/lang/eval-okay-attrs.out
Normal file
|
@ -0,0 +1 @@
|
|||
987
|
1
tests/lang/eval-okay-attrs2.out
Normal file
1
tests/lang/eval-okay-attrs2.out
Normal file
|
@ -0,0 +1 @@
|
|||
987
|
1
tests/lang/eval-okay-attrs3.out
Normal file
1
tests/lang/eval-okay-attrs3.out
Normal file
|
@ -0,0 +1 @@
|
|||
"foo 22 80 itchyxac"
|
1
tests/lang/eval-okay-attrs4.out
Normal file
1
tests/lang/eval-okay-attrs4.out
Normal file
|
@ -0,0 +1 @@
|
|||
[ true false true false false true false false ]
|
1
tests/lang/eval-okay-attrs5.out
Normal file
1
tests/lang/eval-okay-attrs5.out
Normal file
|
@ -0,0 +1 @@
|
|||
[ 123 "foo" 456 456 "foo" "xyzzy" "xyzzy" true ]
|
1
tests/lang/eval-okay-attrs6.out
Normal file
1
tests/lang/eval-okay-attrs6.out
Normal file
|
@ -0,0 +1 @@
|
|||
{ __overrides = { bar = "qux"; }; bar = "qux"; foo = "bar"; }
|
1
tests/lang/eval-okay-autoargs.out
Normal file
1
tests/lang/eval-okay-autoargs.out
Normal file
|
@ -0,0 +1 @@
|
|||
"xyzzy!xyzzy!foobar"
|
1
tests/lang/eval-okay-backslash-newline-1.out
Normal file
1
tests/lang/eval-okay-backslash-newline-1.out
Normal file
|
@ -0,0 +1 @@
|
|||
"a\nb"
|
1
tests/lang/eval-okay-backslash-newline-2.out
Normal file
1
tests/lang/eval-okay-backslash-newline-2.out
Normal file
|
@ -0,0 +1 @@
|
|||
"a\nb"
|
1
tests/lang/eval-okay-builtins-add.out
Normal file
1
tests/lang/eval-okay-builtins-add.out
Normal file
|
@ -0,0 +1 @@
|
|||
[ 5 4 "int" "tt" "float" 4 ]
|
1
tests/lang/eval-okay-builtins.out
Normal file
1
tests/lang/eval-okay-builtins.out
Normal file
|
@ -0,0 +1 @@
|
|||
/foo
|
1
tests/lang/eval-okay-callable-attrs.out
Normal file
1
tests/lang/eval-okay-callable-attrs.out
Normal file
|
@ -0,0 +1 @@
|
|||
true
|
1
tests/lang/eval-okay-catattrs.out
Normal file
1
tests/lang/eval-okay-catattrs.out
Normal file
|
@ -0,0 +1 @@
|
|||
[ 1 2 ]
|
1
tests/lang/eval-okay-closure.out
Normal file
1
tests/lang/eval-okay-closure.out
Normal file
|
@ -0,0 +1 @@
|
|||
[ { foo = true; key = -13; } { foo = true; key = -12; } { foo = true; key = -11; } { foo = true; key = -9; } { foo = true; key = -8; } { foo = true; key = -7; } { foo = true; key = -5; } { foo = true; key = -4; } { foo = true; key = -3; } { key = -1; } { foo = true; key = 0; } { foo = true; key = 1; } { foo = true; key = 2; } { foo = true; key = 4; } { foo = true; key = 5; } { foo = true; key = 6; } { key = 8; } { foo = true; key = 9; } { foo = true; key = 10; } { foo = true; key = 13; } { foo = true; key = 14; } { foo = true; key = 15; } { key = 17; } { foo = true; key = 18; } { foo = true; key = 19; } { foo = true; key = 22; } { foo = true; key = 23; } { key = 26; } { foo = true; key = 27; } { foo = true; key = 28; } { foo = true; key = 31; } { foo = true; key = 32; } { key = 35; } { foo = true; key = 36; } { foo = true; key = 40; } { foo = true; key = 41; } { key = 44; } { foo = true; key = 45; } { foo = true; key = 49; } { key = 53; } { foo = true; key = 54; } { foo = true; key = 58; } { key = 62; } { foo = true; key = 67; } { key = 71; } { key = 80; } ]
|
343
tests/lang/eval-okay-closure.out.xml
Normal file
343
tests/lang/eval-okay-closure.out.xml
Normal file
|
@ -0,0 +1,343 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<expr>
|
||||
<list>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="-13" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="-12" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="-11" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="-9" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="-8" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="-7" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="-5" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="-4" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="-3" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="key">
|
||||
<int value="-1" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="0" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="1" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="2" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="4" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="5" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="6" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="key">
|
||||
<int value="8" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="9" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="10" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="13" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="14" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="15" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="key">
|
||||
<int value="17" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="18" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="19" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="22" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="23" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="key">
|
||||
<int value="26" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="27" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="28" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="31" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="32" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="key">
|
||||
<int value="35" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="36" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="40" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="41" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="key">
|
||||
<int value="44" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="45" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="49" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="key">
|
||||
<int value="53" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="54" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="58" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="key">
|
||||
<int value="62" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="foo">
|
||||
<bool value="true" />
|
||||
</attr>
|
||||
<attr name="key">
|
||||
<int value="67" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="key">
|
||||
<int value="71" />
|
||||
</attr>
|
||||
</attrs>
|
||||
<attrs>
|
||||
<attr name="key">
|
||||
<int value="80" />
|
||||
</attr>
|
||||
</attrs>
|
||||
</list>
|
||||
</expr>
|
1
tests/lang/eval-okay-comments.out
Normal file
1
tests/lang/eval-okay-comments.out
Normal file
|
@ -0,0 +1 @@
|
|||
"abcdefghijklmnopqrstuvwxyz"
|
1
tests/lang/eval-okay-concat.out
Normal file
1
tests/lang/eval-okay-concat.out
Normal file
|
@ -0,0 +1 @@
|
|||
[ 1 2 3 4 5 6 7 8 9 ]
|
1
tests/lang/eval-okay-concatmap.out
Normal file
1
tests/lang/eval-okay-concatmap.out
Normal file
|
@ -0,0 +1 @@
|
|||
[ [ 1 3 5 7 9 ] [ "a" "z" "b" "z" ] ]
|
1
tests/lang/eval-okay-concatstringssep.out
Normal file
1
tests/lang/eval-okay-concatstringssep.out
Normal file
|
@ -0,0 +1 @@
|
|||
[ "" "foobarxyzzy" "foo, bar, xyzzy" "foo" "" ]
|
1
tests/lang/eval-okay-context-introspection.out
Normal file
1
tests/lang/eval-okay-context-introspection.out
Normal file
|
@ -0,0 +1 @@
|
|||
[ true true true true true true ]
|
1
tests/lang/eval-okay-context.out
Normal file
1
tests/lang/eval-okay-context.out
Normal file
|
@ -0,0 +1 @@
|
|||
"foo eval-okay-context.nix bar"
|
1
tests/lang/eval-okay-curpos.out
Normal file
1
tests/lang/eval-okay-curpos.out
Normal file
|
@ -0,0 +1 @@
|
|||
[ 3 7 4 9 ]
|
1
tests/lang/eval-okay-deepseq.out
Normal file
1
tests/lang/eval-okay-deepseq.out
Normal file
|
@ -0,0 +1 @@
|
|||
456
|
1
tests/lang/eval-okay-delayed-with-inherit.out
Normal file
1
tests/lang/eval-okay-delayed-with-inherit.out
Normal file
|
@ -0,0 +1 @@
|
|||
"b-overridden"
|
1
tests/lang/eval-okay-delayed-with.out
Normal file
1
tests/lang/eval-okay-delayed-with.out
Normal file
|
@ -0,0 +1 @@
|
|||
"b-overridden b-overridden a"
|
1
tests/lang/eval-okay-dynamic-attrs-2.out
Normal file
1
tests/lang/eval-okay-dynamic-attrs-2.out
Normal file
|
@ -0,0 +1 @@
|
|||
true
|
1
tests/lang/eval-okay-dynamic-attrs-bare.out
Normal file
1
tests/lang/eval-okay-dynamic-attrs-bare.out
Normal file
|
@ -0,0 +1 @@
|
|||
{ binds = true; hasAttrs = true; multiAttrs = true; recBinds = true; selectAttrs = true; selectOrAttrs = true; }
|
1
tests/lang/eval-okay-dynamic-attrs.out
Normal file
1
tests/lang/eval-okay-dynamic-attrs.out
Normal file
|
@ -0,0 +1 @@
|
|||
{ binds = true; hasAttrs = true; multiAttrs = true; recBinds = true; selectAttrs = true; selectOrAttrs = true; }
|
1
tests/lang/eval-okay-elem.out
Normal file
1
tests/lang/eval-okay-elem.out
Normal file
|
@ -0,0 +1 @@
|
|||
[ true false 30 ]
|
1
tests/lang/eval-okay-empty-args.out
Normal file
1
tests/lang/eval-okay-empty-args.out
Normal file
|
@ -0,0 +1 @@
|
|||
"ab"
|
1
tests/lang/eval-okay-eq-derivations.out
Normal file
1
tests/lang/eval-okay-eq-derivations.out
Normal file
|
@ -0,0 +1 @@
|
|||
[ true true true false ]
|
1
tests/lang/eval-okay-eq.out
Normal file
1
tests/lang/eval-okay-eq.out
Normal file
|
@ -0,0 +1 @@
|
|||
true
|
1
tests/lang/eval-okay-filter.out
Normal file
1
tests/lang/eval-okay-filter.out
Normal file
|
@ -0,0 +1 @@
|
|||
[ 0 2 4 6 8 10 100 102 104 106 108 110 ]
|
1
tests/lang/eval-okay-flatten.out
Normal file
1
tests/lang/eval-okay-flatten.out
Normal file
|
@ -0,0 +1 @@
|
|||
"1234567"
|
1
tests/lang/eval-okay-float.out
Normal file
1
tests/lang/eval-okay-float.out
Normal file
|
@ -0,0 +1 @@
|
|||
[ 3.4 3.5 2.5 1.5 ]
|
1
tests/lang/eval-okay-floor-ceil.out
Normal file
1
tests/lang/eval-okay-floor-ceil.out
Normal file
|
@ -0,0 +1 @@
|
|||
"23;24;23;23"
|
1
tests/lang/eval-okay-foldlStrict-lazy-elements.out
Normal file
1
tests/lang/eval-okay-foldlStrict-lazy-elements.out
Normal file
|
@ -0,0 +1 @@
|
|||
42
|
|
@ -0,0 +1 @@
|
|||
42
|
1
tests/lang/eval-okay-foldlStrict.out
Normal file
1
tests/lang/eval-okay-foldlStrict.out
Normal file
|
@ -0,0 +1 @@
|
|||
500500
|
1
tests/lang/eval-okay-fromTOML.out
Normal file
1
tests/lang/eval-okay-fromTOML.out
Normal file
|
@ -0,0 +1 @@
|
|||
[ { clients = { data = [ [ "gamma" "delta" ] [ 1 2 ] ]; hosts = [ "alpha" "omega" ]; }; database = { connection_max = 5000; enabled = true; ports = [ 8001 8001 8002 ]; server = "192.168.1.1"; }; owner = { name = "Tom Preston-Werner"; }; servers = { alpha = { dc = "eqdc10"; ip = "10.0.0.1"; }; beta = { dc = "eqdc10"; ip = "10.0.0.2"; }; }; title = "TOML Example"; } { "1234" = "value"; "127.0.0.1" = "value"; a = { b = { c = { }; }; }; arr1 = [ 1 2 3 ]; arr2 = [ "red" "yellow" "green" ]; arr3 = [ [ 1 2 ] [ 3 4 5 ] ]; arr4 = [ "all" "strings" "are the same" "type" ]; arr5 = [ [ 1 2 ] [ "a" "b" "c" ] ]; arr7 = [ 1 2 3 ]; arr8 = [ 1 2 ]; bare-key = "value"; bare_key = "value"; bin1 = 214; bool1 = true; bool2 = false; "character encoding" = "value"; d = { e = { f = { }; }; }; dog = { "tater.man" = { type = { name = "pug"; }; }; }; flt1 = 1; flt2 = 3.1415; flt3 = -0.01; flt4 = 5e+22; flt5 = 1e+06; flt6 = -0.02; flt7 = 6.626e-34; flt8 = 9.22462e+06; fruit = [ { name = "apple"; physical = { color = "red"; shape = "round"; }; variety = [ { name = "red delicious"; } { name = "granny smith"; } ]; } { name = "banana"; variety = [ { name = "plantain"; } ]; } ]; g = { h = { i = { }; }; }; hex1 = 3735928559; hex2 = 3735928559; hex3 = 3735928559; int1 = 99; int2 = 42; int3 = 0; int4 = -17; int5 = 1000; int6 = 5349221; int7 = 12345; j = { "ʞ" = { l = { }; }; }; key = "value"; key2 = "value"; name = "Orange"; oct1 = 342391; oct2 = 493; physical = { color = "orange"; shape = "round"; }; products = [ { name = "Hammer"; sku = 738594937; } { } { color = "gray"; name = "Nail"; sku = 284758393; } ]; "quoted \"value\"" = "value"; site = { "google.com" = true; }; str = "I'm a string. \"You can quote me\". Name\tJosé\nLocation\tSF."; table-1 = { key1 = "some string"; key2 = 123; }; table-2 = { key1 = "another string"; key2 = 456; }; x = { y = { z = { w = { animal = { type = { name = "pug"; }; }; name = { first = "Tom"; last = "Preston-Werner"; }; point = { x = 1; y = 2; }; }; }; }; }; "ʎǝʞ" = "value"; } { metadata = { "checksum aho-corasick 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d6531d44de723825aa81398a6415283229725a00fa30713812ab9323faa82fc4"; "checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b"; "checksum ansi_term 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "23ac7c30002a5accbf7e8987d0632fa6de155b7c3d39d0067317a391e00a2ef6"; "checksum arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)" = "a1e964f9e24d588183fcb43503abda40d288c8657dfc27311516ce2f05675aef"; }; package = [ { dependencies = [ "memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" ]; name = "aho-corasick"; source = "registry+https://github.com/rust-lang/crates.io-index"; version = "0.6.4"; } { name = "ansi_term"; source = "registry+https://github.com/rust-lang/crates.io-index"; version = "0.9.0"; } { dependencies = [ "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)" "termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" ]; name = "atty"; source = "registry+https://github.com/rust-lang/crates.io-index"; version = "0.2.10"; } ]; } { a = [ [ { b = true; } ] ]; c = [ [ { d = true; } ] ]; e = [ [ 123 ] ]; } ]
|
1
tests/lang/eval-okay-fromjson-escapes.out
Normal file
1
tests/lang/eval-okay-fromjson-escapes.out
Normal file
|
@ -0,0 +1 @@
|
|||
"quote \" reverse solidus \\ solidus / backspace formfeed newline \n carriage return \r horizontal tab \t 1 char unicode encoded backspace 1 char unicode encoded e with accent é 2 char unicode encoded s with caron š 3 char unicode encoded rightwards arrow →"
|
1
tests/lang/eval-okay-fromjson.out
Normal file
1
tests/lang/eval-okay-fromjson.out
Normal file
|
@ -0,0 +1 @@
|
|||
true
|
1
tests/lang/eval-okay-functionargs.out
Normal file
1
tests/lang/eval-okay-functionargs.out
Normal file
|
@ -0,0 +1 @@
|
|||
[ "stdenv" "fetchurl" "aterm-stdenv" "aterm-stdenv2" "libX11" "libXv" "mplayer-stdenv2.libXv-libX11" "mplayer-stdenv2.libXv-libX11_2" "nix-stdenv-aterm-stdenv" "nix-stdenv2-aterm2-stdenv2" ]
|
15
tests/lang/eval-okay-functionargs.out.xml
Normal file
15
tests/lang/eval-okay-functionargs.out.xml
Normal file
|
@ -0,0 +1,15 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<expr>
|
||||
<list>
|
||||
<string value="stdenv" />
|
||||
<string value="fetchurl" />
|
||||
<string value="aterm-stdenv" />
|
||||
<string value="aterm-stdenv2" />
|
||||
<string value="libX11" />
|
||||
<string value="libXv" />
|
||||
<string value="mplayer-stdenv2.libXv-libX11" />
|
||||
<string value="mplayer-stdenv2.libXv-libX11_2" />
|
||||
<string value="nix-stdenv-aterm-stdenv" />
|
||||
<string value="nix-stdenv2-aterm2-stdenv2" />
|
||||
</list>
|
||||
</expr>
|
1
tests/lang/eval-okay-getattrpos-functionargs.out
Normal file
1
tests/lang/eval-okay-getattrpos-functionargs.out
Normal file
|
@ -0,0 +1 @@
|
|||
{ column = 11; file = "eval-okay-getattrpos-functionargs.nix"; line = 2; }
|
1
tests/lang/eval-okay-getattrpos-undefined.out
Normal file
1
tests/lang/eval-okay-getattrpos-undefined.out
Normal file
|
@ -0,0 +1 @@
|
|||
null
|
1
tests/lang/eval-okay-getattrpos.out
Normal file
1
tests/lang/eval-okay-getattrpos.out
Normal file
|
@ -0,0 +1 @@
|
|||
{ column = 5; file = "eval-okay-getattrpos.nix"; line = 3; }
|
1
tests/lang/eval-okay-getenv.out
Normal file
1
tests/lang/eval-okay-getenv.out
Normal file
|
@ -0,0 +1 @@
|
|||
"foobar"
|
1
tests/lang/eval-okay-groupBy.out
Normal file
1
tests/lang/eval-okay-groupBy.out
Normal file
|
@ -0,0 +1 @@
|
|||
{ "1" = [ 9 ]; "2" = [ 8 ]; "3" = [ 13 29 ]; "4" = [ 3 4 10 11 17 18 ]; "5" = [ 0 23 26 28 ]; "6" = [ 1 12 21 27 30 ]; "7" = [ 7 22 ]; "8" = [ 14 ]; "9" = [ 19 ]; b = [ 16 25 ]; c = [ 24 ]; d = [ 2 ]; e = [ 5 6 15 31 ]; f = [ 20 ]; }
|
1
tests/lang/eval-okay-hashfile.out
Normal file
1
tests/lang/eval-okay-hashfile.out
Normal file
|
@ -0,0 +1 @@
|
|||
[ "d3b07384d113edec49eaa6238ad5ff00" "0f343b0931126a20f133d67c2b018a3b" "f1d2d2f924e986ac86fdf7b36c94bcdf32beec15" "60cacbf3d72e1e7834203da608037b1bf83b40e8" "b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c" "5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef" "0cf9180a764aba863a67b6d72f0918bc131c6772642cb2dce5a34f0a702f9470ddc2bf125c12198b1995c233c34b4afd346c54a2334c350a948a51b6e8b4e6b6" "8efb4f73c5655351c444eb109230c556d39e2c7624e9c11abc9e3fb4b9b9254218cc5085b454a9698d085cfa92198491f07a723be4574adc70617b73eb0b6461" ]
|
1
tests/lang/eval-okay-hashstring.out
Normal file
1
tests/lang/eval-okay-hashstring.out
Normal file
|
@ -0,0 +1 @@
|
|||
[ "d41d8cd98f00b204e9800998ecf8427e" "6c69ee7f211c640419d5366cc076ae46" "bb3438fbabd460ea6dbd27d153e2233b" "da39a3ee5e6b4b0d3255bfef95601890afd80709" "cd54e8568c1b37cf1e5badb0779bcbf382212189" "6d12e10b1d331dad210e47fd25d4f260802b7e77" "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" "900a4469df00ccbfd0c145c6d1e4b7953dd0afafadd7534e3a4019e8d38fc663" "ad0387b3bd8652f730ca46d25f9c170af0fd589f42e7f23f5a9e6412d97d7e56" "cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e" "9d0886f8c6b389398a16257bc79780fab9831c7fc11c8ab07fa732cb7b348feade382f92617c9c5305fefba0af02ab5fd39a587d330997ff5bd0db19f7666653" "21644b72aa259e5a588cd3afbafb1d4310f4889680f6c83b9d531596a5a284f34dbebff409d23bcc86aee6bad10c891606f075c6f4755cb536da27db5693f3a7" ]
|
1
tests/lang/eval-okay-if.out
Normal file
1
tests/lang/eval-okay-if.out
Normal file
|
@ -0,0 +1 @@
|
|||
3
|
1
tests/lang/eval-okay-import.out
Normal file
1
tests/lang/eval-okay-import.out
Normal file
|
@ -0,0 +1 @@
|
|||
[ 1 2 3 4 5 6 7 8 9 10 ]
|
1
tests/lang/eval-okay-ind-string.out
Normal file
1
tests/lang/eval-okay-ind-string.out
Normal file
|
@ -0,0 +1 @@
|
|||
"This is an indented multi-line string\nliteral. An amount of whitespace at\nthe start of each line matching the minimum\nindentation of all lines in the string\nliteral together will be removed. Thus,\nin this case four spaces will be\nstripped from each line, even though\n THIS LINE is indented six spaces.\n\nAlso, empty lines don't count in the\ndetermination of the indentation level (the\nprevious empty line has indentation 0, but\nit doesn't matter).\nIf the string starts with whitespace\n followed by a newline, it's stripped, but\n that's not the case here. Two spaces are\n stripped because of the \" \" at the start. \nThis line is indented\na bit further.\nAnti-quotations, like so, are\nalso allowed.\n The \\ is not special here.\n' can be followed by any character except another ', e.g. 'x'.\nLikewise for $, e.g. $$ or $varName.\nBut ' followed by ' is special, as is $ followed by {.\nIf you want them, use anti-quotations: '', \${.\n Tabs are not interpreted as whitespace (since we can't guess\n what tab settings are intended), so don't use them.\n\tThis line starts with a space and a tab, so only one\n space will be stripped from each line.\nAlso note that if the last line (just before the closing ' ')\nconsists only of whitespace, it's ignored. But here there is\nsome non-whitespace stuff, so the line isn't removed. \nThis shows a hacky way to preserve an empty line after the start.\nBut there's no reason to do so: you could just repeat the empty\nline.\n Similarly you can force an indentation level,\n in this case to 2 spaces. This works because the anti-quote\n is significant (not whitespace).\nstart on network-interfaces\n\nstart script\n\n rm -f /var/run/opengl-driver\n ln -sf 123 /var/run/opengl-driver\n\n rm -f /var/log/slim.log\n \nend script\n\nenv SLIM_CFGFILE=abc\nenv SLIM_THEMESDIR=def\nenv FONTCONFIG_FILE=/etc/fonts/fonts.conf \t\t\t\t# !!! cleanup\nenv XKB_BINDIR=foo/bin \t\t\t\t# Needed for the Xkb extension.\nenv LD_LIBRARY_PATH=libX11/lib:libXext/lib:/usr/lib/ # related to xorg-sys-opengl - needed to load libglx for (AI)GLX support (for compiz)\n\nenv XORG_DRI_DRIVER_PATH=nvidiaDrivers/X11R6/lib/modules/drivers/ \n\nexec slim/bin/slim\nEscaping of ' followed by ': ''\nEscaping of $ followed by {: \${\nAnd finally to interpret \\n etc. as in a string: \n, \r, \t.\nfoo\n'bla'\nbar\ncut -d $'\\t' -f 1\nending dollar $$\n"
|
1
tests/lang/eval-okay-intersectAttrs.out
Normal file
1
tests/lang/eval-okay-intersectAttrs.out
Normal file
|
@ -0,0 +1 @@
|
|||
[ { } { a = 1; } { a = 1; } { a = "a"; } { m = 1; } { m = "m"; } { n = 1; } { n = "n"; } { n = 1; p = 2; } { n = "n"; p = "p"; } { n = 1; p = 2; } { n = "n"; p = "p"; } { a = "a"; b = "b"; c = "c"; d = "d"; e = "e"; f = "f"; g = "g"; h = "h"; i = "i"; j = "j"; k = "k"; l = "l"; m = "m"; n = "n"; o = "o"; p = "p"; q = "q"; r = "r"; s = "s"; t = "t"; u = "u"; v = "v"; w = "w"; x = "x"; y = "y"; z = "z"; } true ]
|
1
tests/lang/eval-okay-let.out
Normal file
1
tests/lang/eval-okay-let.out
Normal file
|
@ -0,0 +1 @@
|
|||
"foobar"
|
1
tests/lang/eval-okay-list.out
Normal file
1
tests/lang/eval-okay-list.out
Normal file
|
@ -0,0 +1 @@
|
|||
"foobarblatest"
|
1
tests/lang/eval-okay-listtoattrs.out
Normal file
1
tests/lang/eval-okay-listtoattrs.out
Normal file
|
@ -0,0 +1 @@
|
|||
"AAbar"
|
1
tests/lang/eval-okay-logic.out
Normal file
1
tests/lang/eval-okay-logic.out
Normal file
|
@ -0,0 +1 @@
|
|||
1
|
1
tests/lang/eval-okay-map.out
Normal file
1
tests/lang/eval-okay-map.out
Normal file
|
@ -0,0 +1 @@
|
|||
"foobarblabarxyzzybar"
|
1
tests/lang/eval-okay-mapattrs.out
Normal file
1
tests/lang/eval-okay-mapattrs.out
Normal file
|
@ -0,0 +1 @@
|
|||
{ x = "x-foo"; y = "y-bar"; }
|
1
tests/lang/eval-okay-nested-with.out
Normal file
1
tests/lang/eval-okay-nested-with.out
Normal file
|
@ -0,0 +1 @@
|
|||
2
|
1
tests/lang/eval-okay-new-let.out
Normal file
1
tests/lang/eval-okay-new-let.out
Normal file
|
@ -0,0 +1 @@
|
|||
"xyzzyfoobar"
|
1
tests/lang/eval-okay-null-dynamic-attrs.out
Normal file
1
tests/lang/eval-okay-null-dynamic-attrs.out
Normal file
|
@ -0,0 +1 @@
|
|||
true
|
1
tests/lang/eval-okay-overrides.out
Normal file
1
tests/lang/eval-okay-overrides.out
Normal file
|
@ -0,0 +1 @@
|
|||
2
|
1
tests/lang/eval-okay-partition.out
Normal file
1
tests/lang/eval-okay-partition.out
Normal file
|
@ -0,0 +1 @@
|
|||
{ right = [ 0 2 4 6 8 10 100 102 104 106 108 110 ]; wrong = [ 1 3 5 7 9 101 103 105 107 109 ]; }
|
1
tests/lang/eval-okay-path-antiquotation.out
Normal file
1
tests/lang/eval-okay-path-antiquotation.out
Normal file
|
@ -0,0 +1 @@
|
|||
{ absolute = /foo; expr = /home/bmc/sources/nix/tests/lang/foo/bar; home = /fake-home/foo; notfirst = /home/bmc/sources/nix/tests/lang/bar/foo; simple = /home/bmc/sources/nix/tests/lang/foo; slashes = /foo/bar; surrounded = /home/bmc/sources/nix/tests/lang/a-foo-b; }
|
1
tests/lang/eval-okay-path.out
Normal file
1
tests/lang/eval-okay-path.out
Normal file
|
@ -0,0 +1 @@
|
|||
"/nix/store/ya937r4ydw0l6kayq8jkyqaips9c75jm-output"
|
1
tests/lang/eval-okay-pathexists.out
Normal file
1
tests/lang/eval-okay-pathexists.out
Normal file
|
@ -0,0 +1 @@
|
|||
true
|
1
tests/lang/eval-okay-patterns.out
Normal file
1
tests/lang/eval-okay-patterns.out
Normal file
|
@ -0,0 +1 @@
|
|||
"abcxyzDDDDEFijk"
|
1
tests/lang/eval-okay-readDir.out
Normal file
1
tests/lang/eval-okay-readDir.out
Normal file
|
@ -0,0 +1 @@
|
|||
{ bar = "regular"; foo = "directory"; ldir = "symlink"; linked = "symlink"; }
|
1
tests/lang/eval-okay-readFileType.out
Normal file
1
tests/lang/eval-okay-readFileType.out
Normal file
|
@ -0,0 +1 @@
|
|||
{ bar = "regular"; foo = "directory"; ldir = "symlink"; linked = "symlink"; }
|
1
tests/lang/eval-okay-readfile.out
Normal file
1
tests/lang/eval-okay-readfile.out
Normal file
|
@ -0,0 +1 @@
|
|||
"builtins.readFile ./eval-okay-readfile.nix\n"
|
1
tests/lang/eval-okay-redefine-builtin.out
Normal file
1
tests/lang/eval-okay-redefine-builtin.out
Normal file
|
@ -0,0 +1 @@
|
|||
false
|
1
tests/lang/eval-okay-regex-match.out
Normal file
1
tests/lang/eval-okay-regex-match.out
Normal file
|
@ -0,0 +1 @@
|
|||
true
|
1
tests/lang/eval-okay-regex-split.out
Normal file
1
tests/lang/eval-okay-regex-split.out
Normal file
|
@ -0,0 +1 @@
|
|||
true
|
1
tests/lang/eval-okay-regression-20220122.out
Normal file
1
tests/lang/eval-okay-regression-20220122.out
Normal file
|
@ -0,0 +1 @@
|
|||
3
|
1
tests/lang/eval-okay-regression-20220125.out
Normal file
1
tests/lang/eval-okay-regression-20220125.out
Normal file
|
@ -0,0 +1 @@
|
|||
3
|
1
tests/lang/eval-okay-remove.out
Normal file
1
tests/lang/eval-okay-remove.out
Normal file
|
@ -0,0 +1 @@
|
|||
456
|
1
tests/lang/eval-okay-replacestrings.out
Normal file
1
tests/lang/eval-okay-replacestrings.out
Normal file
|
@ -0,0 +1 @@
|
|||
[ "faabar" "fbar" "fubar" "faboor" "fubar" "XaXbXcX" "X" "a_b" ]
|
1
tests/lang/eval-okay-scope-1.out
Normal file
1
tests/lang/eval-okay-scope-1.out
Normal file
|
@ -0,0 +1 @@
|
|||
3
|
1
tests/lang/eval-okay-scope-2.out
Normal file
1
tests/lang/eval-okay-scope-2.out
Normal file
|
@ -0,0 +1 @@
|
|||
1
|
1
tests/lang/eval-okay-scope-3.out
Normal file
1
tests/lang/eval-okay-scope-3.out
Normal file
|
@ -0,0 +1 @@
|
|||
4
|
1
tests/lang/eval-okay-scope-4.out
Normal file
1
tests/lang/eval-okay-scope-4.out
Normal file
|
@ -0,0 +1 @@
|
|||
"ccdd"
|
1
tests/lang/eval-okay-scope-6.out
Normal file
1
tests/lang/eval-okay-scope-6.out
Normal file
|
@ -0,0 +1 @@
|
|||
"ccdd"
|
1
tests/lang/eval-okay-scope-7.out
Normal file
1
tests/lang/eval-okay-scope-7.out
Normal file
|
@ -0,0 +1 @@
|
|||
1
|
1
tests/lang/eval-okay-search-path.out
Normal file
1
tests/lang/eval-okay-search-path.out
Normal file
|
@ -0,0 +1 @@
|
|||
"abccX"
|
1
tests/lang/eval-okay-seq.out
Normal file
1
tests/lang/eval-okay-seq.out
Normal file
|
@ -0,0 +1 @@
|
|||
2
|
1
tests/lang/eval-okay-sort.out
Normal file
1
tests/lang/eval-okay-sort.out
Normal file
|
@ -0,0 +1 @@
|
|||
[ [ 42 77 147 249 483 526 ] [ 526 483 249 147 77 42 ] [ "bar" "fnord" "foo" "xyzzy" ] [ { key = 1; value = "foo"; } { key = 1; value = "fnord"; } { key = 2; value = "bar"; } ] [ [ ] [ ] [ 1 ] [ 1 4 ] [ 1 5 ] [ 1 6 ] [ 2 ] [ 2 3 ] [ 3 ] [ 3 ] ] ]
|
1
tests/lang/eval-okay-splitversion.out
Normal file
1
tests/lang/eval-okay-splitversion.out
Normal file
|
@ -0,0 +1 @@
|
|||
[ "1" "2" "3" ]
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue