📄 subst.test
字号:
# Commands covered: subst## 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) 1994 The Regents of the University of California.# Copyright (c) 1994 Sun Microsystems, Inc.# Copyright (c) 1998-2000 Ajuba Solutions.## See the file "license.terms" for information on usage and redistribution# of this file, and for a DISCLAIMER OF ALL WARRANTIES.## RCS: @(#) $Id: subst.test,v 1.13 2003/02/16 01:36:32 msofer Exp $if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest namespace import -force ::tcltest::*}test subst-1.1 {basics} { list [catch {subst} msg] $msg} {1 {wrong # args: should be "subst ?-nobackslashes? ?-nocommands? ?-novariables? string"}}test subst-1.2 {basics} { list [catch {subst a b c} msg] $msg} {1 {bad switch "a": must be -nobackslashes, -nocommands, or -novariables}}test subst-2.1 {simple strings} { subst {}} {}test subst-2.2 {simple strings} { subst a} atest subst-2.3 {simple strings} { subst abcdefg} abcdefgtest subst-3.1 {backslash substitutions} { subst {\x\$x\[foo bar]\\}} "x\$x\[foo bar]\\"test subst-3.2 {backslash substitutions with utf chars} { # 'j' is just a char that doesn't mean anything, and \344 is '
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -