Diff

Differences From Artifact [b7d1fc4561]:

To Artifact [260d7b3ffd]:


9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
    array set config $params

    # Test info
    set line [format "tcltest::test %s-%d.%d {%s}" $group $file_num $tc $tail]
    append line " \\\n\t"

    # Test constraints
    append line [format "-constraints %s" $kdf]
    append line " \\\n\t"

    # Test setup
    append line "-setup {} \\\n\t"

    # Test body parameters
    set cmd [format "tls::%s" [string tolower $kdf]]







|







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
    array set config $params

    # Test info
    set line [format "tcltest::test %s-%d.%d {%s}" $group $file_num $tc $tail]
    append line " \\\n\t"

    # Test constraints
    append line [format "-constraints {%s %s}" [string map [list "-" "_"] $kdf] [string map [list "-" "_"] $digest]]
    append line " \\\n\t"

    # Test setup
    append line "-setup {} \\\n\t"

    # Test body parameters
    set cmd [format "tls::%s" [string tolower $kdf]]
48
49
50
51
52
53
54

55
56
57
58
59
60
61
    #append line "-cleanup {} \\n\t"

    # Test result
    set result ""
    foreach name [list OKM DK Output] {
	if {[info exists config($name)]} {
	    set result $config($name)

	}
    }
    
    append line [format {-match exact -result %s} $result]

    # Return codes
    #append line { -returnCodes 0}







>







48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
    #append line "-cleanup {} \\n\t"

    # Test result
    set result ""
    foreach name [list OKM DK Output] {
	if {[info exists config($name)]} {
	    set result $config($name)
	    break
	}
    }
    
    append line [format {-match exact -result %s} $result]

    # Return codes
    #append line { -returnCodes 0}
83
84
85
86
87
88
89
90
91




92
93
94
95
96
97
98
    lassign [split [string map [list "_" "-"] $tail] "-"] kdf digest
    set params [list]

    # Add config info
    puts $out [format "# Auto generated from \"%s\"" [file tail $filename]]
    puts $out "package require tls"
    puts $out "package require tcltest\n"
    puts $out [format "tcltest::testConstraint %s %s" $kdf \
	[format {[expr {[lsearch -nocase [tls::kdfs] %s] > -1}]} $kdf]]




    puts $out ""

    # Process file
    while {![eof $ch]} {
	gets $ch line
	set line [string trim $line]
	set len [string length $line]







|

>
>
>
>







84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
    lassign [split [string map [list "_" "-"] $tail] "-"] kdf digest
    set params [list]

    # Add config info
    puts $out [format "# Auto generated from \"%s\"" [file tail $filename]]
    puts $out "package require tls"
    puts $out "package require tcltest\n"
    puts $out [format "tcltest::testConstraint %s %s" [string map [list "-" "_"] $kdf] \
	[format {[expr {[lsearch -nocase [tls::kdfs] %s] > -1}]} $kdf]]
    if {$digest ne ""} {
	puts $out [format "tcltest::testConstraint %s %s" [string map [list "-" "_"] $digest] \
	    [format {[expr {[lsearch -nocase [tls::digests] %s] > -1}]} $digest]]
    }
    puts $out ""

    # Process file
    while {![eof $ch]} {
	gets $ch line
	set line [string trim $line]
	set len [string length $line]