File: msgcat.test

package info (click to toggle)
tcllib 1.20%2Bdfsg-1
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 68,064 kB
  • sloc: tcl: 216,842; ansic: 14,250; sh: 2,846; xml: 1,766; yacc: 1,145; pascal: 881; makefile: 107; perl: 84; f90: 84; python: 33; ruby: 13; php: 11
file content (51 lines) | stat: -rw-r--r-- 1,622 bytes parent folder | download | duplicates (7)
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# -*- tcl -*-
# doctools::msgcat.test:  tests for the doctools::msgcat package.
#
# Copyright (c) 2009 by Andreas Kupries <andreas_kupries@users.sourceforge.net>
# All rights reserved.
#
# RCS: @(#) $Id: msgcat.test,v 1.1 2009/04/01 04:27:47 andreas_kupries Exp $

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

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

testsNeedTcl     8.4
testsNeedTcltest 2

support {
    # NOTE: Better use a base local file and test package ?
    use doctools2idx/msgcat_c.tcl doctools::msgcat::idx::c ; # See 'doctools-msgcat-2.0'.
}
testing {
    useLocal msgcat.tcl doctools::msgcat
}

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

array_unset env LANG*
array_unset env LC_*
set env(LANG) C ; # Usually default if nothing is set, OS X requires this.

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

# search paths .............................................................

test doctools-msgcat-1.0 {init, wrong#args, not enough} -body {
    doctools::msgcat::init
} -returnCodes error -result {wrong # args: should be "doctools::msgcat::init prefix"}

test doctools-msgcat-1.1 {init, wrong#args, too many} -body {
    doctools::msgcat::init fu bar
} -returnCodes error -result {wrong # args: should be "doctools::msgcat::init prefix"}

test doctools-msgcat-2.0 {init, ok args} -body {
    doctools::msgcat::init idx
} -result 1

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

testsuiteCleanup
return