Commit Graph

8 Commits

Author SHA1 Message Date
Qi Xiao
c71995ba9a pkg/eval: Add tests for "order &total". 2023-05-19 17:27:37 +01:00
Qi Xiao
3f4bbff9c5 pkg/eval: Add option for total order to the order and compare commands.
The same code will be used to sort map keys when printing maps.

This addresses #1495.
2023-05-18 23:21:18 +01:00
Qi Xiao
34b115d7af Bump prog.DeprecationLevel to 19.
Remove use of float64 in tests, except for one that tests that it is deprecated.
2023-02-27 00:00:12 +00:00
Qi Xiao
08b7c91402 Fixup for #1616.
- Allow using &key and &less-than together.

- Simplify the implementation with a custom implementation of sort.Interface.
2022-11-20 21:48:23 +00:00
Kurtis Rader
306e2d7b8d
Issue 1570 order key option (#1616)
* Allow $nil for Callable options

Related #1570

* Add a `&key` option to the `order` command.

Resolves #1570

Co-authored-by: Qi Xiao <xiaq@users.noreply.github.com>
2022-11-20 19:10:19 +00:00
Qi Xiao
f8f0f3e889 Fixup for #1588 2022-08-29 12:29:24 +01:00
Qi Xiao
acf470f104 New "compact" command.
This fixes #1453.
2022-08-28 22:58:37 +01:00
Qi Xiao
181c4dde55 pkg/eval: Create builtin_fn_stream_test.go.
Tests for functions defined in builtin_fn_stream.go are moved there.
2022-08-28 22:08:00 +01:00