use new logmsg and set --show in tests

This commit is contained in:
Kurtis Rader
2017-08-03 22:01:56 -07:00
parent 864dbaeb43
commit 10fae1836e
3 changed files with 84 additions and 27 deletions

View File

@@ -1,28 +1,67 @@
Testing -V
$foo count=1
$foo[1]=|local foo|
$bar count=5
$bar[1]=|one|
$bar[2]=|two 2|
$bar[3]=| |
$bar[4]=||
$bar[5]=|3|
$baz count=0
Testing -V with changed variables
$foo count=1
$foo[1]=|local foo|
$bar count=5
$bar[1]=|one|
$bar[2]=|two 2|
$bar[3]=| |
$bar[4]=||
$bar[5]=|3|
$baz count=0
####################
# Test the -V flag
####################
# Testing -V
$foo: set in local scope, unexported, with 1 elements
$foo[0]: length=9 value=|local foo|
$foo: set in global scope, unexported, with 1 elements
$foo[0]: length=10 value=|global foo|
$foo: not set in universal scope
$bar: set in local scope, unexported, with 5 elements
$bar[0]: length=3 value=|one|
$bar[1]: length=8 value=|two 2|
$bar[2]: length=1 value=|\t|
$bar[3]: length=0 value=||
$bar[4]: length=1 value=|3|
$bar: set in global scope, unexported, with 5 elements
$bar[0]: length=3 value=|one|
$bar[1]: length=8 value=|two 2|
$bar[2]: length=1 value=|\t|
$bar[3]: length=0 value=||
$bar[4]: length=1 value=|3|
$bar: not set in universal scope
$baz: set in local scope, unexported, with 0 elements
$baz: set in global scope, unexported, with 0 elements
$baz: not set in universal scope
####################
# Testing -V with changed variables
$foo: set in local scope, unexported, with 1 elements
$foo[0]: length=9 value=|local foo|
$foo: set in global scope, unexported, with 1 elements
$foo[0]: length=10 value=|global foo|
$foo: not set in universal scope
$bar: set in local scope, unexported, with 5 elements
$bar[0]: length=3 value=|one|
$bar[1]: length=8 value=|two 2|
$bar[2]: length=1 value=|\t|
$bar[3]: length=0 value=||
$bar[4]: length=1 value=|3|
$bar: set in global scope, unexported, with 1 elements
$bar[0]: length=7 value=|bad bar|
$bar: not set in universal scope
$baz: set in local scope, unexported, with 0 elements
$baz: set in global scope, unexported, with 1 elements
$baz[0]: length=7 value=|bad baz|
$baz: not set in universal scope
Function name1 found
Function name2 not found as expected
Function name3 found
Function name4 not found as expected
Checking that the copied functions are identical other than the name
####################
# Verify that functions can be copied. Tests against regression of issue #3601
####################
# Checking that the copied functions are identical other than the name
1c1
< function name1 --argument arg1 arg2
---