summaryrefslogtreecommitdiffstats
path: root/tests/uplevel.test
diff options
context:
space:
mode:
authorpooryorick <com.digitalsmarties@pooryorick.com>2020-09-19 14:33:24 (GMT)
committerpooryorick <com.digitalsmarties@pooryorick.com>2020-09-19 14:33:24 (GMT)
commitac45c8d85147e6927979c08d95567504148b74cd (patch)
treea3ed13d7c9003e3a95c2e5f16645fdce24016d1a /tests/uplevel.test
parente14285c3a1d7dd2d7407fda5a5c841ccb5cae488 (diff)
downloadtcl-ac45c8d85147e6927979c08d95567504148b74cd.zip
tcl-ac45c8d85147e6927979c08d95567504148b74cd.tar.gz
tcl-ac45c8d85147e6927979c08d95567504148b74cd.tar.bz2
Fix for [b9ecf3ce98], [uplevel] unnecessarily generates string representation.
Diffstat (limited to 'tests/uplevel.test')
-rw-r--r--tests/uplevel.test17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/uplevel.test b/tests/uplevel.test
index f44cedc..5f0dd5c 100644
--- a/tests/uplevel.test
+++ b/tests/uplevel.test
@@ -304,7 +304,24 @@ test uplevel-7.3 {var access, LVT in upper level} -setup {
rename foo {}
rename moo {}
} -result {3 3 3}
+
+
+test uplevel-8.0 {
+ string representation isn't generated when there is only one argument
+} -body {
+ set res {}
+ set script [list lindex 5]
+ lappend res [apply {script {
+ uplevel $script
+ }} $script]
+ lappend res [string match {value is a list *no string representation*} [
+ ::tcl::unsupported::representation $script]]
+} -cleanup {
+ unset script
+ unset res
+} -result {5 1}
+
# cleanup
::tcltest::cleanupTests
return