Tcl Source Code

Hex Artifact Content
Login

Artifact 9ec677947537cb5c728c9ddabf486e0033ba4923:

Attachment "tcl847bug.txt" to ticket [1005454fff] added by lvirden 2004-08-08 17:49:05.
0000: 66 43 6d 64 2e 74 65 73 74 0a 0a 3d 3d 3d 3d 20  fCmd.test..==== 
0010: 66 43 6d 64 2d 32 37 2e 35 20 54 63 6c 46 69 6c  fCmd-27.5 TclFil
0020: 65 41 74 74 72 73 43 6d 64 20 2d 20 73 65 74 74  eAttrsCmd - sett
0030: 69 6e 67 20 6f 6e 65 20 6f 70 74 69 6f 6e 20 46  ing one option F
0040: 41 49 4c 45 44 0a 3d 3d 3d 3d 20 43 6f 6e 74 65  AILED.==== Conte
0050: 6e 74 73 20 6f 66 20 74 65 73 74 20 63 61 73 65  nts of test case
0060: 3a 0a 0a 20 20 20 20 63 61 74 63 68 20 7b 66 69  :..    catch {fi
0070: 6c 65 20 64 65 6c 65 74 65 20 2d 66 6f 72 63 65  le delete -force
0080: 20 2d 2d 20 66 6f 6f 2e 74 6d 70 7d 0a 20 20 20   -- foo.tmp}.   
0090: 20 63 72 65 61 74 65 66 69 6c 65 20 66 6f 6f 2e   createfile foo.
00a0: 74 6d 70 0a 20 20 20 20 73 65 74 20 61 74 74 72  tmp.    set attr
00b0: 73 20 5b 66 69 6c 65 20 61 74 74 72 69 62 75 74  s [file attribut
00c0: 65 73 20 66 6f 6f 2e 74 6d 70 5d 0a 20 20 20 20  es foo.tmp].    
00d0: 6c 69 73 74 20 5b 63 61 74 63 68 20 7b 65 76 61  list [catch {eva
00e0: 6c 20 66 69 6c 65 20 61 74 74 72 69 62 75 74 65  l file attribute
00f0: 73 20 66 6f 6f 2e 74 6d 70 20 5b 6c 72 61 6e 67  s foo.tmp [lrang
0100: 65 20 24 61 74 74 72 73 20 30 20 31 5d 7d 20 6d  e $attrs 0 1]} m
0110: 73 67 5d 20 24 6d 73 67 20 5b 66 69 6c 65 20 64  sg] $msg [file d
0120: 65 6c 65 74 65 20 2d 66 6f 72 63 65 20 2d 2d 20  elete -force -- 
0130: 0a 66 6f 6f 2e 74 6d 70 5d 0a 0a 2d 2d 2d 2d 20  .foo.tmp]..---- 
0140: 52 65 73 75 6c 74 20 77 61 73 3a 0a 31 20 7b 63  Result was:.1 {c
0150: 6f 75 6c 64 20 6e 6f 74 20 73 65 74 20 67 72 6f  ould not set gro
0160: 75 70 20 66 6f 72 20 66 69 6c 65 20 22 66 6f 6f  up for file "foo
0170: 2e 74 6d 70 22 3a 20 6e 6f 74 20 6f 77 6e 65 72  .tmp": not owner
0180: 7d 20 7b 7d 0a 2d 2d 2d 2d 20 52 65 73 75 6c 74  } {}.---- Result
0190: 20 73 68 6f 75 6c 64 20 68 61 76 65 20 62 65 65   should have bee
01a0: 6e 20 28 65 78 61 63 74 20 6d 61 74 63 68 69 6e  n (exact matchin
01b0: 67 29 3a 0a 30 20 7b 7d 20 7b 7d 0a 3d 3d 3d 3d  g):.0 {} {}.====
01c0: 20 66 43 6d 64 2d 32 37 2e 35 20 46 41 49 4c 45   fCmd-27.5 FAILE
01d0: 44 0a 0a 3d 3d 3d 3d 20 66 43 6d 64 2d 32 37 2e  D..==== fCmd-27.
01e0: 36 20 54 63 6c 46 69 6c 65 41 74 74 72 73 43 6d  6 TclFileAttrsCm
01f0: 64 20 2d 20 73 65 74 74 69 6e 67 20 6d 6f 72 65  d - setting more
0200: 20 74 68 61 6e 20 6f 6e 65 20 6f 70 74 69 6f 6e   than one option
0210: 20 46 41 49 4c 45 44 0a 3d 3d 3d 3d 20 43 6f 6e   FAILED.==== Con
0220: 74 65 6e 74 73 20 6f 66 20 74 65 73 74 20 63 61  tents of test ca
0230: 73 65 3a 0a 0a 20 20 20 20 63 61 74 63 68 20 7b  se:..    catch {
0240: 66 69 6c 65 20 64 65 6c 65 74 65 20 2d 66 6f 72  file delete -for
0250: 63 65 20 2d 2d 20 66 6f 6f 2e 74 6d 70 7d 0a 20  ce -- foo.tmp}. 
0260: 20 20 20 63 72 65 61 74 65 66 69 6c 65 20 66 6f     createfile fo
0270: 6f 2e 74 6d 70 0a 20 20 20 20 73 65 74 20 61 74  o.tmp.    set at
0280: 74 72 73 20 5b 66 69 6c 65 20 61 74 74 72 69 62  trs [file attrib
0290: 75 74 65 73 20 66 6f 6f 2e 74 6d 70 5d 0a 20 20  utes foo.tmp].  
02a0: 20 20 6c 69 73 74 20 5b 63 61 74 63 68 20 7b 65    list [catch {e
02b0: 76 61 6c 20 66 69 6c 65 20 61 74 74 72 69 62 75  val file attribu
02c0: 74 65 73 20 66 6f 6f 2e 74 6d 70 20 5b 6c 72 61  tes foo.tmp [lra
02d0: 6e 67 65 20 24 61 74 74 72 73 20 30 20 33 5d 7d  nge $attrs 0 3]}
02e0: 20 6d 73 67 5d 20 24 6d 73 67 20 5b 66 69 6c 65   msg] $msg [file
02f0: 20 64 65 6c 65 74 65 20 2d 66 6f 72 63 65 20 2d   delete -force -
0300: 2d 20 0a 66 6f 6f 2e 74 6d 70 5d 0a 0a 2d 2d 2d  - .foo.tmp]..---
0310: 2d 20 52 65 73 75 6c 74 20 77 61 73 3a 0a 31 20  - Result was:.1 
0320: 7b 63 6f 75 6c 64 20 6e 6f 74 20 73 65 74 20 67  {could not set g
0330: 72 6f 75 70 20 66 6f 72 20 66 69 6c 65 20 22 66  roup for file "f
0340: 6f 6f 2e 74 6d 70 22 3a 20 6e 6f 74 20 6f 77 6e  oo.tmp": not own
0350: 65 72 7d 20 7b 7d 0a 2d 2d 2d 2d 20 52 65 73 75  er} {}.---- Resu
0360: 6c 74 20 73 68 6f 75 6c 64 20 68 61 76 65 20 62  lt should have b
0370: 65 65 6e 20 28 65 78 61 63 74 20 6d 61 74 63 68  een (exact match
0380: 69 6e 67 29 3a 0a 30 20 7b 7d 20 7b 7d 0a 3d 3d  ing):.0 {} {}.==
0390: 3d 3d 20 66 43 6d 64 2d 32 37 2e 36 20 46 41 49  == fCmd-27.6 FAI
03a0: 4c 45 44 0a 0a 0a                                LED...