diff options
Diffstat (limited to 'tvix/eval/src/tests/tvix_tests/eval-okay-stable-sort.nix')
-rw-r--r-- | tvix/eval/src/tests/tvix_tests/eval-okay-stable-sort.nix | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-stable-sort.nix b/tvix/eval/src/tests/tvix_tests/eval-okay-stable-sort.nix new file mode 100644 index 000000000000..9969e0a29433 --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-stable-sort.nix @@ -0,0 +1,7 @@ +let + keys = [ 1 2 3 2 2 2 5 0 5 5 4 3 2 1 2 3 22 ]; +in + +builtins.sort + (a: b: a.key < b.key) + (builtins.genList (index: { inherit index; key = builtins.elemAt keys index; }) (builtins.length keys)) |