Tcl Source Code

Hex Artifact Content
Login

Artifact 0f23689450a30c480ebbc37d22b00cc2f0c9e4b4:

Attachment "patch-test-fCmd" to ticket [1513513fff] added by kot 2006-06-28 01:20:21.
0000: 44 6f 6e 27 74 20 66 61 69 6c 2c 20 77 68 65 6e  Don't fail, when
0010: 20 74 68 65 20 74 65 73 74 65 72 27 73 20 68 6f   the tester's ho
0020: 6d 65 20 64 69 72 65 63 74 6f 72 79 20 28 6f 72  me directory (or
0030: 20 61 6e 79 20 73 75 62 2d 70 61 74 68 0a 74 68   any sub-path.th
0040: 65 72 65 6f 66 29 20 69 73 20 61 20 73 79 6d 62  ereof) is a symb
0050: 6f 6c 69 63 20 6c 69 6e 6b 2e 2e 2e 0a 0a 09 2d  olic link......-
0060: 6d 69 0a 0a 2d 2d 2d 20 74 65 73 74 73 2f 66 43  mi..--- tests/fC
0070: 6d 64 2e 74 65 73 74 09 53 75 6e 20 4d 61 72 20  md.test.Sun Mar 
0080: 31 39 20 31 37 3a 34 37 3a 33 30 20 32 30 30 36  19 17:47:30 2006
0090: 0a 2b 2b 2b 20 74 65 73 74 73 2f 66 43 6d 64 2e  .+++ tests/fCmd.
00a0: 74 65 73 74 09 54 75 65 20 4a 75 6e 20 32 37 20  test.Tue Jun 27 
00b0: 31 34 3a 31 33 3a 35 33 20 32 30 30 36 0a 40 40  14:13:53 2006.@@
00c0: 20 2d 35 37 38 2c 35 20 2b 35 37 38 2c 35 20 40   -578,5 +578,5 @
00d0: 40 0a 20 7d 20 7b 31 20 7b 65 72 72 6f 72 20 63  @. } {1 {error c
00e0: 6f 70 79 69 6e 67 20 22 74 64 32 22 20 74 6f 20  opying "td2" to 
00f0: 22 7e 2f 74 64 31 2f 74 64 32 22 3a 20 70 65 72  "~/td1/td2": per
0100: 6d 69 73 73 69 6f 6e 20 64 65 6e 69 65 64 7d 7d  mission denied}}
0110: 0a 20 74 65 73 74 20 66 43 6d 64 2d 36 2e 32 36  . test fCmd-6.26
0120: 20 7b 43 6f 70 79 52 65 6e 61 6d 65 4f 6e 65 46   {CopyRenameOneF
0130: 69 6c 65 3a 20 64 6f 65 73 6e 27 74 20 75 73 65  ile: doesn't use
0140: 20 6f 72 69 67 69 6e 61 6c 20 6e 61 6d 65 7d 20   original name} 
0150: 5c 0a 2d 09 7b 75 6e 69 78 4f 6e 6c 79 20 6e 6f  \.-.{unixOnly no
0160: 74 52 6f 6f 74 7d 20 7b 0a 2b 09 2d 63 6f 6e 73  tRoot} {.+.-cons
0170: 74 72 61 69 6e 74 73 20 7b 75 6e 69 78 4f 6e 6c  traints {unixOnl
0180: 79 20 6e 6f 74 52 6f 6f 74 7d 20 2d 6d 61 74 63  y notRoot} -matc
0190: 68 20 72 65 67 65 78 70 20 2d 62 6f 64 79 20 7b  h regexp -body {
01a0: 0a 20 20 20 20 20 63 6c 65 61 6e 75 70 0a 20 20  .     cleanup.  
01b0: 20 20 20 66 69 6c 65 20 6d 6b 64 69 72 20 7e 2f     file mkdir ~/
01c0: 74 64 31 2f 74 64 32 0a 40 40 20 2d 35 38 37 2c  td1/td2.@@ -587,
01d0: 35 20 2b 35 38 37 2c 35 20 40 40 0a 20 20 20 20  5 +587,5 @@.    
01e0: 20 66 69 6c 65 20 64 65 6c 65 74 65 20 2d 66 6f   file delete -fo
01f0: 72 63 65 20 7e 2f 74 64 31 0a 20 20 20 20 20 73  rce ~/td1.     s
0200: 65 74 20 6d 73 67 0a 2d 7d 20 22 31 20 7b 65 72  et msg.-} "1 {er
0210: 72 6f 72 20 63 6f 70 79 69 6e 67 20 5c 22 7e 2f  ror copying \"~/
0220: 74 64 31 5c 22 20 74 6f 20 5c 22 74 64 31 5c 22  td1\" to \"td1\"
0230: 3a 20 5c 22 5b 66 69 6c 65 20 6a 6f 69 6e 20 5b  : \"[file join [
0240: 66 69 6c 65 20 64 69 72 6e 61 6d 65 20 7e 5d 20  file dirname ~] 
0250: 5b 66 69 6c 65 20 74 61 69 6c 20 7e 5d 20 74 64  [file tail ~] td
0260: 31 20 74 64 32 5d 5c 22 3a 20 70 65 72 6d 69 73  1 td2]\": permis
0270: 73 69 6f 6e 20 64 65 6e 69 65 64 7d 22 0a 2b 7d  sion denied}".+}
0280: 20 2d 72 65 73 75 6c 74 20 22 31 20 7b 65 72 72   -result "1 {err
0290: 6f 72 20 63 6f 70 79 69 6e 67 20 5c 22 7e 2f 74  or copying \"~/t
02a0: 64 31 5c 22 20 74 6f 20 5c 22 74 64 31 5c 22 3a  d1\" to \"td1\":
02b0: 20 5c 22 2e 2a 5b 66 69 6c 65 20 6a 6f 69 6e 20   \".*[file join 
02c0: 74 64 31 20 74 64 32 5d 5c 22 3a 20 70 65 72 6d  td1 td2]\": perm
02d0: 69 73 73 69 6f 6e 20 64 65 6e 69 65 64 7d 22 0a  ission denied}".
02e0: 20 74 65 73 74 20 66 43 6d 64 2d 36 2e 32 37 20   test fCmd-6.27 
02f0: 7b 43 6f 70 79 52 65 6e 61 6d 65 4f 6e 65 46 69  {CopyRenameOneFi
0300: 6c 65 3a 20 54 63 6c 70 43 6f 70 79 44 69 72 65  le: TclpCopyDire
0310: 63 74 6f 72 79 20 66 61 69 6c 65 64 7d 20 5c 0a  ctory failed} \.
0320: 20 09 7b 75 6e 69 78 4f 6e 6c 79 20 6e 6f 74 52   .{unixOnly notR
0330: 6f 6f 74 20 78 64 65 76 7d 20 7b 0a              oot xdev} {.