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

# ISE test script 15

# Encrypt_File Function Normal Use

set image_count = 0
set failure_count = 0
echo "Test 15: testing encrypt file in normal use on all .jpg images inside directory 'images'"
set key = "enterthekey"
set ise = ".ise"
foreach jpg_file (images/*.jpg)
	set ise_file = $jpg_file$ise
	ise_test_15 $key $jpg_file $ise_file
	if ($status != 0) then
		echo "Test 15: Encrypt 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 15 Passed for all images."
else
    echo "Test 15 Passed for all other images."
endif

exit 0

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