File: common.test

package info (click to toggle)
tcllib 2.0%2Bdfsg-4
  • links: PTS
  • area: main
  • in suites: forky, trixie
  • size: 83,572 kB
  • sloc: tcl: 306,798; ansic: 14,272; sh: 3,035; xml: 1,766; yacc: 1,157; pascal: 881; makefile: 124; perl: 84; f90: 84; python: 33; ruby: 13; php: 11
file content (34 lines) | stat: -rw-r--r-- 916 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# -*- tcl -*-
# common.test:  Tests for the common code of the name service
#
# Sourcing this file into Tcl runs the tests and generates output for
# errors.  No output means no errors were found.

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

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8
testsNeedTcltest 1.0

testing {
    useLocal common.tcl nameserv::common
}

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

test names-common-1.0 {get IP port number, wrong#args, too many} {
    catch {nameserv::common::port a} msg
    set msg
} [tcltest::tooManyArgs nameserv::common::port {}]

test names-common-2.0 {get IP port number} {
    nameserv::common::port
} 38573

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

testsuiteCleanup
return