diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2021-11-28 14:42:46 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2021-11-28 19:07:24 -0700 |
commit | b16512b1803e65a987967d407285d2af37a159e3 (patch) | |
tree | 87e08892f0a83ed5c1471c8d786fdbd8354fafb5 /tests/util.lisp | |
parent | 0c4336893f4781da3abf9390e8a9c3601083e5f3 (diff) | |
download | consfigurator-b16512b1803e65a987967d407285d2af37a159e3.tar.gz |
replace usage of UIOP version comparison utilities with our own
DATA.GIT-SNAPSHOT generates version numbers like 2342423.ab09890f2bcd where
only the first, purely numerical component is intended for comparison, and the
second component is just additional information. UIOP's utilities don't give
the correct answers for cases like that; e.g. (uiop:version<= "1.a" "0") => T.
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'tests/util.lisp')
-rw-r--r-- | tests/util.lisp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/util.lisp b/tests/util.lisp new file mode 100644 index 0000000..bffda68 --- /dev/null +++ b/tests/util.lisp @@ -0,0 +1,19 @@ +(in-package :consfigurator/tests) +(named-readtables:in-readtable :consfigurator) +(in-consfig "consfigurator/tests") + +(deftest version<.1 (version< "1.0.1" "1.0.2") t) + +(deftest version<=.1 (version<= "1.0.1" "1.0.2") t) + +(deftest version<.2 (version< "1.0.1" "1.0.1") nil) + +(deftest version<=.2 (version<= "1.0.1" "1.0.1") t) + +(deftest version<.3 (version< "1.1" "1.0.1") nil) + +(deftest version<=.3 (version<= "1.1" "1.0.1") nil) + +(deftest version<.4 (version< "1.a.1" "1.1") t) + +(deftest version<.5 (version< "1..1" "1.1") t) |