⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 info.test

📁 linux系统下的音频通信
💻 TEST
📖 第 1 页 / 共 2 页
字号:
# Commands covered:  info## This file contains a collection of tests for one or more of the Tcl# built-in commands.  Sourcing this file into Tcl runs the tests and# generates output for errors.  No output means no errors were found.## Copyright (c) 1991-1994 The Regents of the University of California.# Copyright (c) 1994-1995 Sun Microsystems, Inc.## See the file "license.terms" for information on usage and redistribution# of this file, and for a DISCLAIMER OF ALL WARRANTIES.## SCCS: @(#) info.test 1.39 97/08/01 11:10:24if {[string compare test [info procs test]] == 1} then {source defs}test info-1.1 {info args option} {    proc t1 {a bbb c} {return foo}    info args t1} {a bbb c}test info-1.2 {info args option} {    proc t1 {{a default1} {bbb default2} {c default3} args} {return foo}    info a t1} {a bbb c args}test info-1.3 {info args option} {    proc t1 "" {return foo}    info args t1} {}test info-1.4 {info args option} {    catch {rename t1 {}}    list [catch {info args t1} msg] $msg} {1 {"t1" isn't a procedure}}test info-1.5 {info args option} {    list [catch {info args set} msg] $msg} {1 {"set" isn't a procedure}}test info-1.6 {info args option} {    proc t1 {a b} {set c 123; set d $c}    t1 1 2    info args t1} {a b}test info-2.1 {info body option} {    proc t1 {} {body of t1}    info body t1} {body of t1}test info-2.2 {info body option} {    list [catch {info body set} msg] $msg} {1 {"set" isn't a procedure}}test info-2.3 {info body option} {    list [catch {info args set 1} msg] $msg} {1 {wrong # args: should be "info args procname"}}# "info cmdcount" is no longer accurate for compiled commands! The expected# result for info-3.1 used to be "3" and is now "1" since the "set"s have# been compiled away.test info-3.1 {info cmdcount option} {    set x [info cmdcount]    set y 12345    set z [info cm]    expr $z-$x} 1test info-3.2 {info body option} {    list [catch {info cmdcount 1} msg] $msg} {1 {wrong # args: should be "info cmdcount"}}test info-4.1 {info commands option} {    proc t1 {} {}    proc t2 {} {}    set x " [info commands] "    list [string match {* t1 *} $x] [string match {* t2 *} $x] \            [string match {* set *} $x] [string match {* list *} $x]} {1 1 1 1}test info-4.2 {info commands option} {    proc t1 {} {}    rename t1 {}    set x [info comm]    string match {* t1 *} $x} 0test info-4.3 {info commands option} {    proc _t1_ {} {}    proc _t2_ {} {}    info commands _t1_} _t1_test info-4.4 {info commands option} {    proc _t1_ {} {}    proc _t2_ {} {}    lsort [info commands _t*]} {_t1_ _t2_}catch {rename _t1_ {}}catch {rename _t2_ {}}test info-4.5 {info commands option} {    list [catch {info commands a b} msg] $msg} {1 {wrong # args: should be "info commands ?pattern?"}}test info-5.1 {info complete option} {    info complete ""} 1test info-5.2 {info complete option} {    info complete "  \n"} 1test info-5.3 {info complete option} {    info complete "abc def"} 1test info-5.4 {info complete option} {    info complete "a b c d e f \t\n"} 1test info-5.5 {info complete option} {    info complete {a b c"d}} 1test info-5.6 {info complete option} {    info complete {a b "c d" e}} 1test info-5.7 {info complete option} {    info complete {a b "c d"}} 1test info-5.8 {info complete option} {    info complete {a b "c d"}} 1test info-5.9 {info complete option} {    info complete {a b "c d}} 0test info-5.10 {info complete option} {    info complete {a b "}} 0test info-5.11 {info complete option} {    info complete {a b "cd"xyz}} 1test info-5.12 {info complete option} {    info complete {a b "c $d() d"}} 1test info-5.13 {info complete option} {    info complete {a b "c $dd("}} 0test info-5.14 {info complete option} {    info complete {a b "c \"}} 0test info-5.15 {info complete option} {    info complete {a b "c [d e f]"}} 1test info-5.16 {info complete option} {    info complete {a b "c [d e f] g"}} 1test info-5.17 {info complete option} {    info complete {a b "c [d e f"}} 0test info-5.18 {info complete option} {    info complete {a {b c d} e}} 1test info-5.19 {info complete option} {    info complete {a {b c d}}} 1test info-5.20 {info complete option} {    info complete "a b\{c d"} 1test info-5.21 {info complete option} {    info complete "a b \{c"} 0test info-5.22 {info complete option} {    info complete "a b \{c{ }"} 0test info-5.23 {info complete option} {    info complete "a b {c d e}xxx"} 1test info-5.24 {info complete option} {    info complete "a b {c \\\{d e}xxx"} 1test info-5.25 {info complete option} {    info complete {a b [ab cd ef]}} 1test info-5.26 {info complete option} {    info complete {a b x[ab][cd][ef] gh}} 1test info-5.27 {info complete option} {    info complete {a b x[ab][cd[ef] gh}} 0test info-5.28 {info complete option} {    info complete {a b x[ gh}} 0test info-5.29 {info complete option} {    info complete {[]]]}} 1test info-5.30 {info complete option} {    info complete {abc x$yyy}} 1test info-5.31 {info complete option} {    info complete "abc x\${abc\[\\d} xyz"} 1test info-5.32 {info complete option} {    info complete "abc x\$\{ xyz"} 0test info-5.33 {info complete option} {    info complete {word $a(xyz)}} 1test info-5.34 {info complete option} {    info complete {word $a(}} 0test info-5.35 {info complete option} {    info complete "set a \\\n"} 0test info-5.36 {info complete option} {    info complete "set a \\n "} 1test info-5.37 {info complete option} {    info complete "set a \\"} 1test info-5.38 {info complete option} {    info complete "foo \\\n\{"} 0test info-5.39 {info complete option} {    info complete " # \{"} 1test info-5.40 {info complete option} {    info complete "foo bar;# \{"} 1test info-5.41 {info complete option} {    info complete "a\nb\n# \{\n# \{\nc\n"} 1test info-5.42 {info complete option} {    info complete "#Incomplete comment\\\n"} 0test info-5.43 {info complete option} {    info complete "#Incomplete comment\\\nBut now it's complete.\n"} 1test info-5.44 {info complete option} {    info complete "# Complete comment\\\\\n"} 1test info-5.45 {info complete option} {    info complete "abc\\\n def"} 1test info-5.46 {info complete option} {    info complete "abc\\\n "} 1test info-5.47 {info complete option} {    info complete "abc\\\n"} 0test info-6.1 {info default option} {    proc t1 {a b {c d} {e "long default value"}} {}    info default t1 a value} 0test info-6.2 {info default option} {    proc t1 {a b {c d} {e "long default value"}} {}    set value 12345    info d t1 a value    set value} {}test info-6.3 {info default option} {    proc t1 {a b {c d} {e "long default value"}} {}    info default t1 c value} 1test info-6.4 {info default option} {    proc t1 {a b {c d} {e "long default value"}} {}    set value 12345    info default t1 c value    set value} dtest info-6.5 {info default option} {    proc t1 {a b {c d} {e "long default value"}} {}    set value 12345    set x [info default t1 e value]    list $x $value} {1 {long default value}}test info-6.6 {info default option} {    list [catch {info default a b} msg] $msg} {1 {wrong # args: should be "info default procname arg varname"}}test info-6.7 {info default option} {    list [catch {info default _nonexistent_ a b} msg] $msg} {1 {"_nonexistent_" isn't a procedure}}test info-6.8 {info default option} {    proc t1 {a b} {}    list [catch {info default t1 x value} msg] $msg} {1 {procedure "t1" doesn't have an argument "x"}}test info-6.9 {info default option} {    catch {unset a}    set a(0) 88    proc t1 {a b} {}    list [catch {info default t1 a a} msg] $msg} {1 {couldn't store default value in variable "a"}}test info-6.10 {info default option} {    catch {unset a}    set a(0) 88    proc t1 {{a 18} b} {}    list [catch {info default t1 a a} msg] $msg} {1 {couldn't store default value in variable "a"}}catch {unset a}test info-7.1 {info exists option} {    set value foo    info exists value} 1catch {unset _nonexistent_}test info-7.2 {info exists option} {    info exists _nonexistent_} 0test info-7.3 {info exists option} {    proc t1 {x} {return [info exists x]}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -