Added unit test to explore the deallocation failure.
This commit is contained in:
parent
ea0d9a2629
commit
fae4a4d444
14
unit-tests/memory.sh
Normal file
14
unit-tests/memory.sh
Normal file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/bash
|
||||
|
||||
actual=`echo "" | target/psse 2>&1 | tail -2`
|
||||
|
||||
alloc=`echo $actual | sed 's/[[:punct:]]/ /g' | awk '{print $4}'`
|
||||
dealloc=`echo $actual | sed 's/[[:punct:]]/ /g' | awk '{print $6}'`
|
||||
|
||||
if [ "${alloc}" = "${dealloc}" ]
|
||||
then
|
||||
echo "OK"
|
||||
else
|
||||
echo "Fail: expected '${alloc}', got '${dealloc}'"
|
||||
exit 1
|
||||
fi
|
Loading…
Reference in a new issue