summaryrefslogtreecommitdiffstats
path: root/tests/clock.test
Commit message (Collapse)AuthorAgeFilesLines
...
| | | * | | tweak error-messagesjan.nijtmans2021-02-181-8/+8
| | | | | |
| | | * | | Merge 8.6jan.nijtmans2020-10-301-3/+3
| | | |\ \ \
| | | * \ \ \ Merge 8.6jan.nijtmans2020-10-121-14/+68
| | | |\ \ \ \
| | | * | | | | small amend to #21 allowing time without seconds part "hh:mm" as extended ↵sebres2020-06-221-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ISO time (with and without T literal)
| | | * | | | | optimized ISO 8601 timestamp (with extended formats, T literal is optional ↵sebres2020-06-221-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | now, more tests); decreases conflicts (10 shift/reduce and 9 reduce/reduce only);
| | | * | | | | added test-cases illustrating bug #21: literal may be mistakenly recognized ↵sebres2020-06-221-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | as a time-zone (doesn't consider word-boundaries)
| | | * | | | | more tests time-zone independentsebres2020-06-221-14/+15
| | | | | | | |
| | | * | | | | merge 8.6sebres2020-06-221-41/+54
| | | |\ \ \ \ \
| | | * | | | | | simplification of new testssebres2020-06-221-10/+10
| | | | | | | | |
| | | * | | | | | added test case illustrating bug #20 - wrong relative clock calculation on ↵sebres2020-06-221-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | negative month offset over threshold of a year
| | | * | | | | | test case illustrating #19: some initialization of clock.tcl (locale/msgcat, ↵sebres2020-06-221-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | etc) could overwrite interp state (errorInfo/errorCode)
| | | * | | | | | small amend to [3bec82b72c] (sebres/tclclockmod#18): test cases extended to ↵sebres2019-07-151-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cover error cases (on ambiguous short forms of month) too
| | | * | | | | | Fixes sebres/tclclockmod#18 (Fails to parse short month name for June); sebres2019-07-151-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The reason for that was the wrong length calculation by scanning through my string index tree, so the ambiguity check `j->(jan,ju->(jun,jul))` failed for 2nd element Ju(ne) with length 2. Simple fix and test-cases covering that, but it looks like this has a good potential for speedup (todo: move length calculation from search to build)
| | | * | | | | | merge 8.6sebres2019-07-151-10/+12
| | | |\ \ \ \ \ \
| | | * | | | | | | scan: all JDN/JD are signed, so allow parse negative Julian dayssebres2019-03-131-0/+11
| | | | | | | | | |
| | | * | | | | | | format: add support of new JDN-tokens (calendar JD `%EJ`, astronomical JD ↵sebres2019-03-131-51/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `%Ej`) with time fraction.
| | | * | | | | | | scan: extended with token `%EJ` to scan calendar julian day with time ↵sebres2019-03-131-6/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fraction (in opposite to astronomical JD `%Ej` it starts at midnight like `%J` token).
| | | * | | | | | | implemented scan of astronomical julian day (JDN/ID) with token `%Ej`, ↵sebres2019-03-131-0/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | corresponds julian date of sqlite-database. In opposite to calendar julian day `%J`, it starts the day at noon (and can parse float, so contains a time fraction). **TODO** implement `clock format ... -format %Ej` and test-cases for format of this token. **TODO** implement `%EJ` token for calendar JD with time fraction.
| | | * | | | | | | format: fix padding on output of julian day token `%J`: restored tcl-core ↵sebres2019-01-251-16/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | compatibility (7x 0-padding, affected in B.C.E. only): `clock format -210866803200 -format %J -gmt 1` results into `0000000`.
| | | * | | | | | | fixes [16e4fc3096] julian day calculation (mostly affected for very small ↵sebres2019-01-251-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | times, B.C.E. between 4714 and 4713), added test-cases covering that.
| | | * | | | | | | merge 8.6sebres2019-01-101-36/+44
| | | |\ \ \ \ \ \ \
| | | * | | | | | | | test-cases: clock-45.* - new compatibility tests checking several scan ↵sebres2018-11-291-2/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | regression on spaces
| | | * | | | | | | | scan: new tests for validation rules: invalid time (DST-hole, out of range ↵sebres2018-10-051-0/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in time-zone)
| | | * | | | | | | | revert explicit adding of validity mode suffix in all test-cases: used ↵sebres2018-05-291-8591/+8601
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wrapper command "test" instead
| | | * | | | | | | | conditional test-call rewritten: realized via tests\clock-ivm.test to cover ↵sebres2018-05-291-14/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | inverted default validation mode
| | | * | | | | | | | validation rules: extended for day of year (and test covered now)sebres2018-05-291-0/+14
| | | | | | | | | | |
| | | * | | | | | | | validation rules ready for scan/freescan; test cases extended; code review ↵sebres2018-05-291-8601/+8770
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and clean-up; running of test cases with and without validate.
| | | * | | | | | | | try to re-implement validation rules for `clock scan` (option `-valid 1|0`), ↵sebres2018-05-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | see http://core.tcl.tk/tcl/tktview?name=3475995
| | | * | | | | | | | Merge branch 'freescan_tz_fix'sebres2018-05-291-0/+94
| | | | | | | | | | |
| | | * | | | | | | | follow http://core.tcl.tk/tcl/info/a3463a55a6a27eed: Historical change ↵sebres2018-05-291-118/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | affecting tests: Detroit did not observe Daylight Saving Time in 1967
| | | * | | | | | | | fixed test-cases (regardless the current time zone)sebres2018-05-291-4/+4
| | | | | | | | | | |
| | | * | | | | | | | FreeScan: rewritten lexer rules and some tokens for better space ↵sebres2018-05-291-2/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | recognition; fewer conflicts (shift/reduce, reduce/reduce); differentiate between TZ like "GMT+1" and relative offsets "GMT +1 day", etc.; test-cases extended for new cases.
| | | * | | | | | | | try to fix GMT+0000, etc. **still wrong**, because of "GMT+1" and because of ↵sebres2018-05-291-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | longest match "00:00 GMT +1000 days" (in this case "days" == "1 day")... % clock scan "+1000 days" -base 100000000 -gmt 1 186364800 % clock scan "00:00 GMT +1000 days" -base 100000000 -gmt 1 100015200 % clock format [clock scan "GMT+10"] Thu Sep 14 19:54:16 CEST 2017 % clock format [clock scan "GMT+1000"] Thu Sep 14 10:04:20 CEST 2017 % clock format [clock scan "GMT+10"] Thu Sep 14 19:54:23 CEST 2017 % clock format [clock scan "GMT-1000"] Fri Sep 15 06:04:39 CEST 2017 %
| | | * | | | | | | | FreeScan: repair scanning date/time with TZ using '+', ex.: "31 Jan 14 ↵sebres2018-05-291-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 23:59:59 +0100", additionally another TZ formats can be used now (token [zone] used instead of sequence '-' tNUMBER); test cases extended. Closes http://core.tcl.tk/tcl/tktview?name=5019748c73 Cherry picked from fossil branch "sebres_clock_tz_fix", check-in [5f72c863f17145b4]
| | | * | | | | | | | generic\tclStrIdxTree.c: bug fix (lost abbreviation), if tree will be built ↵sebres2018-05-291-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | from 2 lists, and the short form differentiate from long form ("jan." vs "january", note the dot-char), don't use longest form - should be split in 2 entries with common parent "jan". Thus use simple case (don't split) only if found item is covered in full (e. g. "jan" vs "january", note without dot-char). Test covered now (clock-29.181x, locale "fr") - `clock scan [clock format 0 -format {%a %d-%m-%Y} -locale fr] -format {%a %d-%m-%Y} -locale fr`
| | | * | | | | | | | fixed test case clock-0.1 "auto-loading of ensemble and stubs on demand" - ↵sebres2018-05-291-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | makes no sense if tclclockmod loaded.
| | | * | | | | | | | fixed overflow of year (resp. julianday), closes ticket [16e4fc3096]; test ↵sebres2017-08-081-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cases adjusted.
| | | * | | | | | | | fixed wrong options suggestions by wrong args, like 'bad option "-base" ...' ↵sebres2017-06-071-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (for format) or 'bad option "-format" ...' (for add). Note: sub-commands share common options table, because for the options often used the same literals (objects), so it avoids permanent "recompiling" of option object representation to indexType with another table.
| | | * | | | | | | | Clock options should be alphabetica (so "-base" first). Struct members ↵jan.nijtmans2017-06-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | should start with lowercase.
| | | * | | | | | | | [win32] repair clock using system timezone (default :localtime) resp. locale ↵sebres2017-06-021-12/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | for windows (broken after removal of registry-fix in [848d01b6ef])
| | | * | | | | | | | [win32] repair clock test-cases for windows, using system locale / TZ ↵sebres2017-06-021-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | :localtime (broken after removal of registry-fix in [848d01b6ef])
| | | * | | | | | | | Fixed stardate format: be sure positive after decimal point (note: ↵sebres2017-05-121-15/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | clock-value can be negative - modulo operation in C has the same sign as dividend)
| | | * | | | | | | | auto-loading of ensemble and stubs on demand only (+ test covered now, see ↵sebres2017-05-111-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | clock-0.1); introduces new possibility to implement namespace-based auto-loading, e. g.: set ::auto_index_ns(::some::namespace) [list ::source [::file join $dir some namespace.tcl]]] loading of clock-stubs (clock.tcl) implemented via handler "auto_index_ns" now.
| | | * | | | | | | | Fixed possible wrong current date for CET / CEST test cases.sebres2017-05-101-3/+12
| | | | | | | | | | |
| | | * | | | | | | | Fixed wrong args message (e.g. "clock format ..." instead of ↵sebres2017-05-101-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "::tcl::clock::format") if failed through compiled ensemble execution.
| | | * | | | | | | | clock.test normalized (compared with trunk)sebres2017-05-101-40/+95
| | | | | | | | | | |
| | | * | | | | | | | [interim-merge-commit] back-ported branch sebres-clock-speedup (from trunk ↵sebres2017-05-101-44/+322
| | | |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to 8.6): tcl-clock functionality rewritten in C.
| | | | * | | | | | | | amend lost changes after rebase to fossilsebres2017-01-101-0/+1
| | | | | | | | | | | |
| | | | * | | | | | | | "clock add" rewritten in C, using common functionality of "clock scan" (and ↵sebres2017-01-101-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | freescan)... test-performance.tcl: test cases extended to cover "clock add"
| | | | * | | | | | | | another way to make greedy search more precise, some greedy matches are ↵sebres2017-01-101-7/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fixed (see test cases clock-6.22.11 - clock-6.22.20), additionally involving look ahead token of known type into pre-search process.