# csv-export.test:  tests for the CSV export module in Password Gorilla
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	See the
# GNU General Public License for more details.

# -------------------------------------------------------------------------

package require tcltest 2.2
# set argv ""
# eval ::tcltest::configure $argv
set testname [info script]
puts "------------------------------------------------------------------"
puts "Running $testname for Password Gorilla ..."

# ------------- sample -----------------
#
# proc TestProcedure { item } { return $item }
# 
# test gorilla-0.2 { description } \
# 	-setup { set item FALSE } \
# 	-body { TestProcedure $item } \
# 	-result OK \
# 	-cleanup { unset item }
# 


# -------------------------------------------------------------------------
# work in a safe environment for testing purposes

namespace eval ::gorilla::test {
	namespace import ::tcltest::*
	
	# CATEGORY: CSV-EXPORT
	# --------------------

	# test $testname-1.2 {File Open Error} \
	# -setup { set ::DEBUG(CSVIMPORT) 1 } \
	# -body { gorilla::Import unknown.csv } \
	# -cleanup { set ::DEBUG(CSVIMPORT) 0 } \
	# -result GORILLA_OPENERROR

	cleanupTests
	
} ;# end of namespace eval ::gorilla::test

# ----------------------------------------------------------------------
# cleanup
namespace delete ::gorilla::test
puts "Tests for unit $testname finished."
