aboutsummaryrefslogtreecommitdiffstats
path: root/test/testdata/eval-okay-sort.nix
diff options
context:
space:
mode:
Diffstat (limited to 'test/testdata/eval-okay-sort.nix')
-rw-r--r--test/testdata/eval-okay-sort.nix20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/testdata/eval-okay-sort.nix b/test/testdata/eval-okay-sort.nix
new file mode 100644
index 0000000..50aa78e
--- /dev/null
+++ b/test/testdata/eval-okay-sort.nix
@@ -0,0 +1,20 @@
1with builtins;
2
3[ (sort lessThan [ 483 249 526 147 42 77 ])
4 (sort (x: y: y < x) [ 483 249 526 147 42 77 ])
5 (sort lessThan [ "foo" "bar" "xyzzy" "fnord" ])
6 (sort (x: y: x.key < y.key)
7 [ { key = 1; value = "foo"; } { key = 2; value = "bar"; } { key = 1; value = "fnord"; } ])
8 (sort lessThan [
9 [ 1 6 ]
10 [ ]
11 [ 2 3 ]
12 [ 3 ]
13 [ 1 5 ]
14 [ 2 ]
15 [ 1 ]
16 [ ]
17 [ 1 4 ]
18 [ 3 ]
19 ])
20]