summaryrefslogtreecommitdiff
path: root/tests/configs
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2019-12-03 09:39:19 -0500
committerJeff Forcier <jeff@bitprophet.org>2019-12-03 10:50:46 -0500
commit951519da879384a08e6f4e161ca00ef3a7d290b1 (patch)
tree5271a74007157caa32f9cf7534e53d156446de63 /tests/configs
parent004462b40ea156b783456463b042a8f71bd22d1e (diff)
downloadparamiko-951519da879384a08e6f4e161ca00ef3a7d290b1.tar.gz
Fill in rest of Match exec tests - all pass
Diffstat (limited to 'tests/configs')
-rw-r--r--tests/configs/match-exec8
-rw-r--r--tests/configs/match-exec-canonical10
-rw-r--r--tests/configs/match-exec-negation5
-rw-r--r--tests/configs/match-exec-no-arg2
4 files changed, 25 insertions, 0 deletions
diff --git a/tests/configs/match-exec b/tests/configs/match-exec
index 88d3f769..763346ea 100644
--- a/tests/configs/match-exec
+++ b/tests/configs/match-exec
@@ -6,3 +6,11 @@ Match exec unquoted
Match exec "quoted spaced"
User neil
+
+# Just to prepopulate values for tokenizing subsequent exec
+Host target
+ User intermediate
+ HostName configured
+
+Match exec "%d %h %L %l %n %p %r %u"
+ Port 1337
diff --git a/tests/configs/match-exec-canonical b/tests/configs/match-exec-canonical
new file mode 100644
index 00000000..794ee9d5
--- /dev/null
+++ b/tests/configs/match-exec-canonical
@@ -0,0 +1,10 @@
+CanonicalDomains paramiko.org
+CanonicalizeHostname always
+
+# This will match in the first, uncanonicalized pass
+Match !canonical exec uncanonicalized
+ User defenseless
+
+# And this will match the second time
+Match canonical exec canonicalized
+ Port 8007
diff --git a/tests/configs/match-exec-negation b/tests/configs/match-exec-negation
new file mode 100644
index 00000000..937c910e
--- /dev/null
+++ b/tests/configs/match-exec-negation
@@ -0,0 +1,5 @@
+Match !exec "this succeeds"
+ User nope
+
+Match !exec "this fails"
+ User yup
diff --git a/tests/configs/match-exec-no-arg b/tests/configs/match-exec-no-arg
new file mode 100644
index 00000000..20c16d16
--- /dev/null
+++ b/tests/configs/match-exec-no-arg
@@ -0,0 +1,2 @@
+Match exec
+ User uh-oh