#!/usr/local/bin/tcsh -f

# ISE test script 17

# Encrypt_File Function with Output ISE File Name Not Set
rm ise_images/*.ise

set key = "enterthekey"

set image_count = 0
set failure_count = 0
echo "Test 17: testing encrypt file with ISE file name not set on all .jpg images inside directory 'images'"

foreach jpg_file (images/*.jpg)
    ise_test_17 $key $jpg_file
    if ($status != 0) then
	echo "Test 17: Encrypt with no ise file name failed for "$jpg_file
	@ failure_count += 1
    endif
    @ image_count += 1
    if ($image_count == 100) then
	echo "...still working"
	@ image_count = 0
    endif
end

mv images/*.ise ise_images/

chmod 777 ise_images/*.ise

if ($failure_count == 0) then
    echo "Test 17 passed for all images"
else
    echo "Test 17 passed for all other images"
endif

exit 0

###############
# END OF FILE #
###############
