Skip to content

Commit

Permalink
reorg & ensure the target version of qcode is loaded by package require
Browse files Browse the repository at this point in the history
  • Loading branch information
david committed Aug 30, 2012
1 parent 982b713 commit ed1ff39
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 8 deletions.
6 changes: 4 additions & 2 deletions Makefile
@@ -1,20 +1,22 @@
NAME=qcode
VERSION=1.7
PACKAGEDIR=qcode
TESTDIR=test
MAINTAINER=hackers@qcode.co.uk
RELEASE=$(shell cat RELEASE)
REMOTEUSER=debian.qcode.co.uk
REMOTEHOST=debian.qcode.co.uk
REMOTEDIR=debian.qcode.co.uk

.PHONY: all
.PHONY: all test

all: package upload clean incr-release
package:
checkinstall -D --deldoc --backup=no --install=no --pkgname=$(NAME)-$(VERSION) --pkgversion=$(VERSION) --pkgrelease=$(RELEASE) -A all -y --maintainer $(MAINTAINER) --pkglicense="BSD" --reset-uids=yes --requires "tcl8.5,tcllib,qcode-doc,html2text,curl,tclcurl" --replaces none --conflicts none make install

test:
tclsh ./test_all.tcl -testdir $(PACKAGEDIR)
make install
tclsh ./test_all.tcl -testdir $(TESTDIR)

install:
./pkg_mkIndex $(PACKAGEDIR)
Expand Down
2 changes: 1 addition & 1 deletion qcode/cast.test → test/cast.test
@@ -1,6 +1,6 @@
package require tcltest
eval ::tcltest::configure $argv
package require qcode 1.7
package require qcode
namespace import qc::*

namespace eval ::qcode::test {
Expand Down
2 changes: 1 addition & 1 deletion qcode/check.test → test/check.test
@@ -1,6 +1,6 @@
package require tcltest
eval ::tcltest::configure $argv
package require qcode 1.7
package require qcode
namespace import qc::*

namespace eval ::qcode::test {
Expand Down
2 changes: 1 addition & 1 deletion qcode/csv.test → test/csv.test
@@ -1,6 +1,6 @@
package require tcltest
eval ::tcltest::configure $argv
package require qcode 1.7
package require qcode
namespace import qc::*

namespace eval ::qcode::test {
Expand Down
2 changes: 1 addition & 1 deletion qcode/date.test → test/date.test
@@ -1,6 +1,6 @@
package require tcltest
eval ::tcltest::configure $argv
package require qcode 1.7
package require qcode
namespace import qc::*

namespace eval ::qcode::test {
Expand Down
19 changes: 19 additions & 0 deletions test/dict.test
@@ -0,0 +1,19 @@
package require tcltest
eval ::tcltest::configure $argv
package require qcode
namespace import qc::*

namespace eval ::qcode::test {

namespace import ::tcltest::*

# variable test_dict { [dict create a 1 [dict create b1 1 b2 2] c 3] }
#
# test dict_exists-1.0 {dict_exists success} -setup $test_dict -body {
# dict_exists $test
# } -cleanup {
# file delete $file
# } -result 1

}
namespace delete ::qcode::test
2 changes: 1 addition & 1 deletion qcode/file.test → test/file.test
@@ -1,6 +1,6 @@
package require tcltest
eval ::tcltest::configure $argv
package require qcode 1.7
package require qcode
namespace import qc::*

namespace eval ::qcode::test {
Expand Down
1 change: 0 additions & 1 deletion test_all.tcl
@@ -1,5 +1,4 @@
package require tcltest
package require qcode 1.7
::tcltest::configure -testdir [file dirname [file normalize [info script]]]
eval ::tcltest::configure $argv
::tcltest::runAllTests

0 comments on commit ed1ff39

Please sign in to comment.