aboutsummaryrefslogtreecommitdiff
path: root/tests/standard-version/testscript
diff options
context:
space:
mode:
Diffstat (limited to 'tests/standard-version/testscript')
-rw-r--r--tests/standard-version/testscript82
1 files changed, 82 insertions, 0 deletions
diff --git a/tests/standard-version/testscript b/tests/standard-version/testscript
index e5e3248..b6bc1a0 100644
--- a/tests/standard-version/testscript
+++ b/tests/standard-version/testscript
@@ -297,3 +297,85 @@
}
}
}
+
+: satisfaction
+:
+{
+ test.options += -s
+
+ : comparison
+ :
+ : Constraints have a single endpoint being present.
+ :
+ {
+ : eq
+ :
+ {
+ $* '1.2.3' '== 1.2.3' >y : eq
+ $* '1.2.3' '<= 1.2.3' >y : le
+ $* '1.2.3' '< 1.2.3' >n : lt
+ $* '1.2.3' '>= 1.2.3' >y : ge
+ $* '1.2.3' '> 1.2.3' >n : gt
+ }
+
+ : smaller-greater
+ :
+ {
+ $* '1.2.3' '== 1.2.4' >n : eq
+ $* '1.2.3' '<= 1.2.4' >y : le
+ $* '1.2.3' '< 1.2.4' >y : lt
+ $* '1.2.3' '>= 1.2.4' >n : ge
+ $* '1.2.3' '> 1.2.4' >n : gt
+ }
+
+ : greater-smaller
+ :
+ {
+ $* '1.2.4' '<= 1.2.3' >n : le
+ $* '1.2.4' '< 1.2.3' >n : lt
+ $* '1.2.4' '>= 1.2.3' >y : ge
+ $* '1.2.4' '> 1.2.3' >y : gt
+ }
+ }
+
+ : range
+ :
+ : Constraints have both endpoints being present.
+ :
+ {
+ : left-out
+ :
+ {
+ $* '1.2.3' '[1.2.4 1.2.5]' >n : closed
+ $* '1.2.3' '(1.2.4 1.2.5]' >n : open
+ }
+
+ : left-endpoint
+ :
+ {
+ $* '1.2.3' '[1.2.3 1.2.4]' >y : closed
+ $* '1.2.3' '(1.2.3 1.2.4]' >n : open
+ }
+
+ : in
+ :
+ {
+ $* '1.2.3' '[1.2.2 1.2.4]' >y : closed
+ $* '1.2.3' '(1.2.2 1.2.4)' >y : open
+ }
+
+ : right-endpoint
+ :
+ {
+ $* '1.2.3' '[1.2.2 1.2.3]' >y : closed
+ $* '1.2.3' '[1.2.2 1.2.3)' >n : open
+ }
+
+ : right-out
+ :
+ {
+ $* '1.2.3' '[1.2.1 1.2.2]' >n : closed
+ $* '1.2.3' '[1.2.1 1.2.2)' >n : open
+ }
+ }
+}