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

📄 cmdah.test

📁 tcl是工具命令语言
💻 TEST
📖 第 1 页 / 共 4 页
字号:
    set env(HOME) "/home/test"    testsetplatform mac    set result [list [catch {file dirname ~} msg] $msg]    set env(HOME) $temp    set result} {0 home:}# tailtest cmdAH-9.1 {Tcl_FileObjCmd: tail} {    testsetplatform unix    list [catch {file tail a b} msg] $msg} {1 {wrong # args: should be "file tail name"}}test cmdAH-9.2 {Tcl_FileObjCmd: tail} {    testsetplatform unix    file tail /a/b} btest cmdAH-9.3 {Tcl_FileObjCmd: tail} {    testsetplatform unix    file tail {}} {}test cmdAH-9.4 {Tcl_FileObjCmd: tail} {    testsetplatform mac    file tail {}} {}test cmdAH-9.5 {Tcl_FileObjCmd: tail} {    testsetplatform win    file tail {}} {}test cmdAH-9.6 {Tcl_FileObjCmd: tail} {    testsetplatform unix    file tail .def} .deftest cmdAH-9.7 {Tcl_FileObjCmd: tail} {    testsetplatform mac    file tail a} atest cmdAH-9.8 {Tcl_FileObjCmd: tail} {    testsetplatform win    file tail a} atest cmdAH-9.9 {Tcl_FileObjCmd: tail} {    testsetplatform unix    file ta a/b/c.d} c.dtest cmdAH-9.10 {Tcl_FileObjCmd: tail} {    testsetplatform unix    file tail a/b.c/d} dtest cmdAH-9.11 {Tcl_FileObjCmd: tail} {    testsetplatform unix    file tail /.} .test cmdAH-9.12 {Tcl_FileObjCmd: tail} {    testsetplatform unix    file tail /} {}test cmdAH-9.13 {Tcl_FileObjCmd: tail} {    testsetplatform unix    file tail /foo} footest cmdAH-9.14 {Tcl_FileObjCmd: tail} {    testsetplatform unix    file tail //foo} footest cmdAH-9.15 {Tcl_FileObjCmd: tail} {    testsetplatform unix    file tail //foo/bar} bartest cmdAH-9.16 {Tcl_FileObjCmd: tail} {    testsetplatform unix    file tail {//foo\/bar/baz}} baztest cmdAH-9.17 {Tcl_FileObjCmd: tail} {    testsetplatform unix    file tail {//foo\/bar/baz/blat}} blattest cmdAH-9.18 {Tcl_FileObjCmd: tail} {    testsetplatform unix    file tail /foo//} footest cmdAH-9.19 {Tcl_FileObjCmd: tail} {    testsetplatform unix    file tail ./a} atest cmdAH-9.20 {Tcl_FileObjCmd: tail} {    testsetplatform unix    file tail a/.a} .atest cmdAH-9.21 {Tcl_FileObjCmd: tail} {    testsetplatform windows    file tail c:foo} footest cmdAH-9.22 {Tcl_FileObjCmd: tail} {    testsetplatform windows    file tail c:} {}test cmdAH-9.23 {Tcl_FileObjCmd: tail} {    testsetplatform windows    file tail c:/} {}test cmdAH-9.24 {Tcl_FileObjCmd: tail} {    testsetplatform windows    file tail {c:\foo}} footest cmdAH-9.25 {Tcl_FileObjCmd: tail} {    testsetplatform windows    file tail {//foo/bar/baz}} baztest cmdAH-9.26 {Tcl_FileObjCmd: tail} {    testsetplatform windows    file tail {//foo/bar}} {}test cmdAH-9.27 {Tcl_FileObjCmd: tail} {    testsetplatform mac    file tail :} :test cmdAH-9.28 {Tcl_FileObjCmd: tail} {    testsetplatform mac    file tail :Foo} Footest cmdAH-9.29 {Tcl_FileObjCmd: tail} {    testsetplatform mac    file tail Foo:} {}test cmdAH-9.30 {Tcl_FileObjCmd: tail} {    testsetplatform mac    file tail Foo:bar} bartest cmdAH-9.31 {Tcl_FileObjCmd: tail} {    testsetplatform mac    file tail :Foo:bar} bartest cmdAH-9.32 {Tcl_FileObjCmd: tail} {    testsetplatform mac    file tail ::} ::test cmdAH-9.33 {Tcl_FileObjCmd: tail} {    testsetplatform mac    file tail :::} ::test cmdAH-9.34 {Tcl_FileObjCmd: tail} {    testsetplatform mac    file tail /foo/bar/} bartest cmdAH-9.35 {Tcl_FileObjCmd: tail} {    testsetplatform mac    file tail /foo/bar} bartest cmdAH-9.36 {Tcl_FileObjCmd: tail} {    testsetplatform mac    file tail /foo} {}test cmdAH-9.37 {Tcl_FileObjCmd: tail} {    testsetplatform mac    file tail foo} footest cmdAH-9.38 {Tcl_FileObjCmd: tail} {    testsetplatform mac    file tail ~:foo} footest cmdAH-9.39 {Tcl_FileObjCmd: tail} {    testsetplatform mac    file tail ~bar:foo} footest cmdAH-9.40 {Tcl_FileObjCmd: tail} {    testsetplatform mac    file tail ~bar/foo} footest cmdAH-9.41 {Tcl_FileObjCmd: tail} {    testsetplatform mac    file tail ~/foo} footest cmdAH-9.42 {Tcl_FileObjCmd: tail} {    global env    set temp $env(HOME)    set env(HOME) "/home/test"    testsetplatform unix    set result [file tail ~]    set env(HOME) $temp    set result} testtest cmdAH-9.43 {Tcl_FileObjCmd: tail} {    global env    set temp $env(HOME)    set env(HOME) "~"    testsetplatform unix    set result [file tail ~]    set env(HOME) $temp    set result} {}test cmdAH-9.44 {Tcl_FileObjCmd: tail} {    global env    set temp $env(HOME)    set env(HOME) "/home/test"    testsetplatform windows    set result [file tail ~]    set env(HOME) $temp    set result} testtest cmdAH-9.45 {Tcl_FileObjCmd: tail} {    global env    set temp $env(HOME)    set env(HOME) "/home/test"    testsetplatform mac    set result [file tail ~]    set env(HOME) $temp    set result} testtest cmdAH-9.46 {Tcl_FileObjCmd: tail} {    testsetplatform unix    file tail {f.oo\bar/baz.bat}} baz.battest cmdAH-9.47 {Tcl_FileObjCmd: tail} {    testsetplatform windows    file tail c:foo} footest cmdAH-9.48 {Tcl_FileObjCmd: tail} {    testsetplatform windows    file tail c:} {}test cmdAH-9.49 {Tcl_FileObjCmd: tail} {    testsetplatform windows    file tail c:/foo} footest cmdAH-9.50 {Tcl_FileObjCmd: tail} {    testsetplatform windows    file tail {c:/foo\bar}} bartest cmdAH-9.51 {Tcl_FileObjCmd: tail} {    testsetplatform windows    file tail {foo\bar}} bar# rootnametest cmdAH-10.1 {Tcl_FileObjCmd: rootname} {    testsetplatform unix    list [catch {file rootname a b} msg] $msg} {1 {wrong # args: should be "file rootname name"}}test cmdAH-10.2 {Tcl_FileObjCmd: rootname} {    testsetplatform unix    file rootname {}} {}test cmdAH-10.3 {Tcl_FileObjCmd: rootname} {    testsetplatform unix    file ro foo} footest cmdAH-10.4 {Tcl_FileObjCmd: rootname} {    testsetplatform unix    file rootname foo.} footest cmdAH-10.5 {Tcl_FileObjCmd: rootname} {    testsetplatform unix    file rootname .foo} {}test cmdAH-10.6 {Tcl_FileObjCmd: rootname} {    testsetplatform unix    file rootname abc.def} abctest cmdAH-10.7 {Tcl_FileObjCmd: rootname} {    testsetplatform unix    file rootname abc.def.ghi} abc.deftest cmdAH-10.8 {Tcl_FileObjCmd: rootname} {    testsetplatform unix    file rootname a/b/c.d} a/b/ctest cmdAH-10.9 {Tcl_FileObjCmd: rootname} {    testsetplatform unix    file rootname a/b.c/d} a/b.c/dtest cmdAH-10.10 {Tcl_FileObjCmd: rootname} {    testsetplatform unix    file rootname a/b.c/} a/b.c/test cmdAH-10.11 {Tcl_FileObjCmd: rootname} {    testsetplatform mac    file ro foo} footest cmdAH-10.12 {Tcl_FileObjCmd: rootname} {    testsetplatform mac    file rootname {}} {}test cmdAH-10.13 {Tcl_FileObjCmd: rootname} {    testsetplatform mac    file rootname foo.} footest cmdAH-10.14 {Tcl_FileObjCmd: rootname} {    testsetplatform mac    file rootname .foo} {}test cmdAH-10.15 {Tcl_FileObjCmd: rootname} {    testsetplatform mac    file rootname abc.def} abctest cmdAH-10.16 {Tcl_FileObjCmd: rootname} {    testsetplatform mac    file rootname abc.def.ghi} abc.deftest cmdAH-10.17 {Tcl_FileObjCmd: rootname} {    testsetplatform mac    file rootname a:b:c.d} a:b:ctest cmdAH-10.18 {Tcl_FileObjCmd: rootname} {    testsetplatform mac    file rootname a:b.c:d} a:b.c:dtest cmdAH-10.19 {Tcl_FileObjCmd: rootname} {    testsetplatform mac    file rootname a/b/c.d} a/b/ctest cmdAH-10.20 {Tcl_FileObjCmd: rootname} {    testsetplatform mac    file rootname a/b.c/d} a/b.c/dtest cmdAH-10.21 {Tcl_FileObjCmd: rootname} {    testsetplatform mac    file rootname /a.b} /atest cmdAH-10.22 {Tcl_FileObjCmd: rootname} {    testsetplatform mac    file rootname foo.c:} foo.c:test cmdAH-10.23 {Tcl_FileObjCmd: rootname} {    testsetplatform windows    file rootname {}} {}test cmdAH-10.24 {Tcl_FileObjCmd: rootname} {    testsetplatform windows    file ro foo} footest cmdAH-10.25 {Tcl_FileObjCmd: rootname} {    testsetplatform windows    file rootname foo.} footest cmdAH-10.26 {Tcl_FileObjCmd: rootname} {    testsetplatform windows    file rootname .foo} {}test cmdAH-10.27 {Tcl_FileObjCmd: rootname} {    testsetplatform windows    file rootname abc.def} abctest cmdAH-10.28 {Tcl_FileObjCmd: rootname} {    testsetplatform windows    file rootname abc.def.ghi} abc.deftest cmdAH-10.29 {Tcl_FileObjCmd: rootname} {    testsetplatform windows    file rootname a/b/c.d} a/b/ctest cmdAH-10.30 {Tcl_FileObjCmd: rootname} {    testsetplatform windows    file rootname a/b.c/d} a/b.c/dtest cmdAH-10.31 {Tcl_FileObjCmd: rootname} {    testsetplatform windows    file rootname a\\b.c\\} a\\b.c\\test cmdAH-10.32 {Tcl_FileObjCmd: rootname} {    testsetplatform windows    file rootname a\\b\\c.d} a\\b\\ctest cmdAH-10.33 {Tcl_FileObjCmd: rootname} {    testsetplatform windows    file rootname a\\b.c\\d} a\\b.c\\dtest cmdAH-10.34 {Tcl_FileObjCmd: rootname} {    testsetplatform windows    file rootname a\\b.c\\} a\\b.c\\set num 35foreach outer { {} a .a a. a.a } {  foreach inner { {} a .a a. a.a } {    set thing [format %s/%s $outer $inner];   test cmdAH-6.$num {Tcl_FileObjCmd: rootname and extension options} {	testsetplatform unix	format %s%s [file rootname $thing] [file ext $thing]    } $thing    set num [expr $num+1]  }}# extensiontest cmdAH-11.1 {Tcl_FileObjCmd: extension} {    testsetplatform unix    list [catch {file extension a b} msg] $msg} {1 {wrong # args: should be "file extension name"}}test cmdAH-11.2 {Tcl_FileObjCmd: extension} {    testsetplatform unix    file extension {}} {}test cmdAH-11.3 {Tcl_FileObjCmd: extension} {    testsetplatform unix    file ext foo} {}test cmdAH-11.4 {Tcl_FileObjCmd: extension} {    testsetplatform unix    file extension foo.} .test cmdAH-11.5 {Tcl_FileObjCmd: extension} {    testsetplatform unix    file extension .foo} .footest cmdAH-11.6 {Tcl_FileObjCmd: extension} {    testsetplatform unix    file extension abc.def} .deftest cmdAH-11.7 {Tcl_FileObjCmd: extension} {    testsetplatform unix    file extension abc.def.ghi} .ghitest cmdAH-11.8 {Tcl_FileObjCmd: extension} {    testsetplatform unix    file extension a/b/c.d} .dtest cmdAH-11.9 {Tcl_FileObjCmd: extension} {    testsetplatform unix    file extension a/b.c/d} {}test cmdAH-11.10 {Tcl_FileObjCmd: extension} {    testsetplatform unix    file extension a/b.c/

⌨️ 快捷键说明

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