lix/src
Andreas Rammhold 059ae7f6c4
Add unit tests for libexpr (#5377)
* libexpr: fix builtins.split example

The example was previously indicating that multiple whitespaces would be
collapsed into a single captured whitespace. That isn't true and was
likely a mistake when being documented initially.

* Fix segfault on unitilized list when printing value

Since lists are just chunks of memory the individual elements in the
list might be unitilized when a programming error happens within Nix.

In this case the values are null-initialized (at least with Boehm GC)
and we can avoid a nullptr deref when printing them.

I ran into this issue while ensuring that new expression tests would
show the actual value on an assertion failure.

This is unlikely to cause any runtime performance regressions as
printing values is not really in the hot path (unless the repl is the
primary use case).

* Add operator<< for ValueTypes

* Add libexpr tests

This introduces tests for libexpr that evalulate various trivial Nix
language expressions and primop invocations that should be good smoke
tests wheter or not the implementation is behaving as expected.
2022-05-06 18:05:27 +02:00
..
build-remote Generalize DerivationType in preparation for impure derivations 2022-03-18 14:59:56 +00:00
libcmd renderMarkdownToTerminal(): Avoid line overflow 2022-05-06 13:14:49 +02:00
libexpr Add unit tests for libexpr (#5377) 2022-05-06 18:05:27 +02:00
libfetchers Fix the parsing of the sourcehut refs file 2022-05-04 14:38:59 +02:00
libmain Avoid fmt when constructor already does it 2022-04-19 01:44:11 +00:00
libstore Fix compiler warning 2022-05-04 11:31:39 +02:00
libutil Fix the parsing of the sourcehut refs file 2022-05-04 14:38:59 +02:00
nix nix profile: Support overriding outputs 2022-05-03 15:00:34 +02:00
nix-build Get rid of most .at calls (#6393) 2022-05-04 07:44:32 +02:00
nix-channel Fix segfault in headerCallback() 2022-03-03 11:11:16 +01:00
nix-collect-garbage Deduplicate the Store downcasting with a template 2022-03-11 13:32:33 +00:00
nix-copy-closure copyPaths: Pass store by reference 2021-07-22 09:59:51 +02:00
nix-env store Symbols in a table as well, like positions 2022-04-21 21:56:31 +02:00
nix-instantiate store Symbols in a table as well, like positions 2022-04-21 21:56:31 +02:00
nix-store Deduplicate the Store downcasting with a template 2022-03-11 13:32:33 +00:00
resolve-system-dependencies Get rid of most .at calls (#6393) 2022-05-04 07:44:32 +02:00
toml11 Replace cpptoml with toml11 2021-12-17 22:03:33 +01:00