Skip to content
Tcl Source Code Artifact [a0809073ce]
Login

Artifact [a0809073ce]

Artifact a0809073cecde4369ac3a52b4fd9ea542e17b6a3:

Ticket change [a0809073ce] - New ticket [218989ffffffffff|218989ffff] <i>Some new tests for the clock command</i>. by nobody on 2000-10-26 01:09:00.
D 2000-10-26T01:09:00
J assignee nobody
J cmimetype text/plain
J comment OriginalBugID:\s3671\sRFE\nVersion:\s8.2.2\nSubmitDate:\s'1999-11-23'\nLastModified:\s'2000-01-12'\nSeverity:\sLOW\nStatus:\sReleased\nSubmitter:\stechsupp\nChangedBy:\sericm\nOS:\sLinux-SuSE\nFixedDate:\s'2000-01-12'\nFixedInVersion:\s8.3\nClosedDate:\s'2000-10-25'\n\n\nName:\n\nChristian\sKrone\n\n\n\nDesiredBehavior:\n\nTwo\sweeks\sago\sHume\sSmith\swrote\sin\scomp.lang.tcl\sa\snice\sapplication\n\nof\sthe\sclock\scommand:\n\n>\s>I\shave\sa\squestion\sof\sthe\sclock's\sscan\sformat.\n\n>\s>How\sis\sthe\s2nd\sMonday\sin\sNovember\sexpressed\sin\sTcl?\n\n>\sbest\si\scan\sdo\sis\n\n>\s%\sforeach\si\s{90\s91\s92\s93\s94\s95\s96\s97\s98\s99}\s{\n\n>\sputs\s[clock\sformat\s[clock\sscan\smonday\s-base\s[clock\sscan\s11/8/$i]]]\n\n>\s}\n\nI\stried\sthis\sin\sJacl,\sand\sI\sfound\stwo\serrors\sin\sone\scommand!\n\nSince\sboth\serrors\sare\snot\stested\sby\sclock.test,\sI\sadded\ssome\stests\n\nfor\sdaynames\sand\s-base\soption.\n\n\n\nPatch:\n\n***\sclock.test.orgSat\sJun\s26\s05:54:10\s1999\n\n---\sclock.testMon\sNov\s22\s10:57:28\s1999\n\n***************\n\n***\s209,214\s****\n\n---\s209,243\s----\n\n\s\s\s\s\s\sclock\sformat\s$time\s-format\s%j\s-gmt\strue\n\n\s\s}\s{060}\n\n\s\s\n\n+\s#\sweekday\sspecification\sand\sbase.\n\n+\stest\sclock-7.1\s{2nd\smonday\sin\snovember}\s{\n\n+\s\s\s\s\sset\sres\s{}\n\n+\s\s\s\s\sforeach\si\s{91\s92\s93\s94\s95\s96}\s{\n\n+\sset\snov8th\s[clock\sscan\s11/8/$i\s-gmt\strue]\n\n+\sset\smonday\s[clock\sscan\smonday\s-base\s$nov8th\s-gmt\strue]\n\n+\slappend\sres\s[clock\sformat\s$monday\s-format\s%Y-%m-%d\s-gmt\strue]\n\n+\s\s\s\s\s}\n\n+\s\s\s\s\sset\sres\n\n+\s}\s{1991-11-11\s1992-11-09\s1993-11-08\s1994-11-14\s1995-11-13\s1996-11-11}\n\n+\stest\sclock-7.2\s{2nd\smonday\sin\snovember\s(2nd\stry)}\s{\n\n+\s\s\s\s\sset\sres\s{}\n\n+\s\s\s\s\sforeach\si\s{91\s92\s93\s94\s95\s96}\s{\n\n+\sset\snov1th\s[clock\sscan\s11/1/$i\s-gmt\strue]\n\n+\sset\smonday\s[clock\sscan\s"2\smonday"\s-base\s$nov1th\s-gmt\strue]\n\n+\slappend\sres\s[clock\sformat\s$monday\s-format\s%Y-%m-%d\s-gmt\strue]\n\n+\s\s\s\s\s}\n\n+\s\s\s\s\sset\sres\n\n+\s}\s{1991-11-11\s1992-11-09\s1993-11-08\s1994-11-14\s1995-11-13\s1996-11-11}\n\n+\stest\sclock-7.3\s{last\smonday\sin\snovember}\s{\n\n+\s\s\s\s\sset\sres\s{}\n\n+\s\s\s\s\sforeach\si\s{91\s92\s93\s94\s95\s96}\s{\n\n+\sset\sdec1th\s[clock\sscan\s12/1/$i\s-gmt\strue]\n\n+\sset\smonday\s[clock\sscan\s"monday\s1\sweek\sago"\s-base\s$dec1th\s-gmt\strue]\n\n+\slappend\sres\s[clock\sformat\s$monday\s-format\s%Y-%m-%d\s-gmt\strue]\n\n+\s\s\s\s\s}\n\n+\s\s\s\s\sset\sres\n\n+\s}\s{1991-11-25\s1992-11-30\s1993-11-29\s1994-11-28\s1995-11-27\s1996-11-25}\n\n+\s\n\n\s\s#\scleanup\n\n\s\s::tcltest::cleanupTests\n\n\s\sreturn\n\n\n\nPatchFiles:\n\nclock.test\n\n\n\n\n\nYou\sdon't\swant\sthe\s-gmt\strue\sbits\sset\sthough...\s\n--\s01/12/2000\shobbs\n\nI\sadded\sthese\stests\s(with\sthe\s-gmt\strue\sbits\sdropped)\sto\sthe\stest\ssuite.\s\sThey\sare\sgood\stests\sof\sthe\srelative\stime\sscans.\s\sWith\sregards\sto\sremoving\sthe\s-gmt\strue\sbits:\n\nFor\sreasons\swe\sdon't\syet\sunderstand,\sadding\s-gmt\strue\sgoofs\sthe\stests\ssomehow.\s\sThis\sis\strue\sin\s8.0,\s8.2\sand\s8.3.\s\sIt\swould\sbe\sworthwhile\sto\sinvestigate\sfurther\sand\stry\sto\sdetermine\sjust\swhat\sit\sis\sthat\scauses\sthe\sproblem\swhen\s-gmt\sis\sturned\son;\smy\ssuspicion\sis\sthat\sit\sis\srelated\sto\sDST\scorrections,\swhich\sshouldn't\sbe\sused\sif\sGMT\smode\sis\son.\n\nSo\sthat\swe\sremember\sto\sinvestigate\snext\stime\swe\swork\son\sthe\sclock\scommand,\sI\swill\sadd\sthe\sunaltered\stests,\swith\sthe\sknownBug\sflag\sset,\sas\swell.\n\n-\seric\n\n--\s01/12/2000\sericm\n\n
J foundin obsolete:\s8.2.2
J priority 5\sMedium
J resolution None
J status Open
J submitter nobody
J subsystem 48.\sNumber\sHandling
J title Some\snew\stests\sfor\sthe\sclock\scommand
J type Bug
K 218989ffffffffffffffffffffffffffffffffff
U nobody
Z 60b92fb91a7cd935cb6beca624b715cb