blob: d0ef70d4e678605d296cde8ee67ef336a20918d6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
with builtins;
let
s = "${builtins.derivation { name = "test"; builder = "/bin/sh"; system = "x86_64-linux"; }}";
in
if getContext s == getContext "${substring 0 0 s + unsafeDiscardStringContext s}"
then "okay"
else throw "empty substring should preserve context"
|