summaryrefslogtreecommitdiff
path: root/t/namespace.t
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2023-07-22 14:07:56 +0100
committerdakkar <dakkar@thenautilus.net>2023-07-22 14:07:56 +0100
commit709cf92de411b7a57c7298f8d970901930c4ce0f (patch)
tree1c88dd977cc60698c8fc22d7eab0c80a2b294764 /t/namespace.t
parent`*-into` always takes the destination as `$1` (diff)
downloadbash-object-system-709cf92de411b7a57c7298f8d970901930c4ce0f.tar.gz
bash-object-system-709cf92de411b7a57c7298f8d970901930c4ce0f.tar.bz2
bash-object-system-709cf92de411b7a57c7298f8d970901930c4ce0f.zip
fix block&namespace nesting
Diffstat (limited to 't/namespace.t')
-rw-r--r--t/namespace.t17
1 files changed, 17 insertions, 0 deletions
diff --git a/t/namespace.t b/t/namespace.t
new file mode 100644
index 0000000..e367720
--- /dev/null
+++ b/t/namespace.t
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+. t/testlib.sh
+
+namespace One; do
+ function test() { echo One/test; }
+
+ class Two; do
+ function test() { echo One/Two/test; }
+ done
+
+done
+
+is "$(One/test)" One/test 'function should be moved to namespace'
+is "$(One/Two/test)" One/Two/test 'class should be moved to namespace'
+
+done-testing