Compact path notation now expands correctly
This commit is contained in:
parent
5c6ac7f75d
commit
c63c262b74
7 changed files with 145 additions and 8 deletions
|
|
@ -5,6 +5,7 @@
|
|||
expected='{}'
|
||||
actual=`echo "$expected" | target/psse | tail -1`
|
||||
|
||||
echo -n "Empty map using compact map notation: "
|
||||
if [ "${expected}" = "${actual}" ]
|
||||
then
|
||||
echo "OK"
|
||||
|
|
|
|||
31
unit-tests/path-notation.sh
Executable file
31
unit-tests/path-notation.sh
Executable file
|
|
@ -0,0 +1,31 @@
|
|||
#!/bin/bash
|
||||
|
||||
#####################################################################
|
||||
# Create a path from root using compact path notation
|
||||
expected='(-> oblist :users :simon :functions (quote assoc))'
|
||||
actual=`echo "'/:users:simon:functions/assoc" | target/psse | tail -1`
|
||||
|
||||
echo -n "Path from root (oblist) using compact notation: "
|
||||
if [ "${expected}" = "${actual}" ]
|
||||
then
|
||||
echo "OK"
|
||||
else
|
||||
echo "Fail: expected '${expected}', got '${actual}'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#####################################################################
|
||||
# Create a path from the current session using compact path notation
|
||||
expected='(-> session :input-stream)'
|
||||
actual=`echo "'$:input-stream" | target/psse | tail -1`
|
||||
|
||||
echo -n "Path from current session using compact notation: "
|
||||
if [ "${expected}" = "${actual}" ]
|
||||
then
|
||||
echo "OK"
|
||||
else
|
||||
echo "Fail: expected '${expected}', got '${actual}'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue