#!/bin/ksh93

#exec > test2.out 2>&1
print "Test 2: Alleges that ksh93 is generating unnecessary directory lookups (possibly globbing) when doing typeset & unset involving an associative array"

print -n "Count of directory lookups from test2a.ksh: " 
/usr/bin/truss -t getdents ./test2a.ksh 2>&1 | /usr/bin/grep getdents | wc -l
print "  Note: test2a.ksh only does a loop of 100k typeset -A calls"
print -n "Count of directory lookups from test2b.ksh: " 
/usr/bin/truss -t getdents ./test2b.ksh 2>&1 | /usr/bin/grep getdents | wc -l
print "  Note: test2b.ksh only does a loop of 100k unset calls"
