Thanks for the patch!  I've been meaning to get around to testing DST
stuff.  I haven't tried this patch out yet but wanted to comment on the
testing style a little.  Just nitpicks really so please bear with me.

Derek Chen-Becker <[email protected]> writes:

> +(ert-deftest test-org/org-timestamp-change-dst ()
> +  "Test that `org-timestamp-change' properly errors at DST boundaries."
> +  ;; Using the process environment to ensure the correct timezone for this 
> test
> +  (let ((process-environment (cons "TZ=America/New_York" 
> process-environment)))

You can use the macro `org-test-with-timezone' like what is done in
`test-org-habit/dst'.

> +    ;; Shifting the hour from 3:05 to 2:05 falls into the gap and should 
> error
> +    (should-error
> +     (org-test-with-temp-text "<2026-03-08 Sun 03:05>"
> +                              (forward-char 16) ;; Put the cursor on the hour
> +                              (org-timestamp-change -1 'hour)

Instead of the `forward-char', you can simply do:

(org-test-with-temp-text "<2026-03-08 Sun 03<point>:05>"

Also you shouldn't need to set the point since you are passing in a
value to the optional argument WHAT.

> +                              :type 'user-error
> +                              ))
> +    ;; Shifting the minutes from 3:00 to 2:55 falls into the gap and should 
> error
> +    (should-error
> +     (org-test-with-temp-text "<2026-03-08 Sun 03:00>"
> +                              (forward-char 19) ;; Put the cursor on the 
> minute
> +                              (org-timestamp-change -1 'minute)
> +                              :type 'user-error
> +                              ))))

First, I would love a comment telling me what DST is occuring like the
comment I wrote in `test-org-habit/dst' which says:

;; DST transition (spring forward) [2009-03-08 01:59] -> [2009-03-08 03:00]

Second, I would love to see tests for the other DST transition (fall
back).


I hope you find these comments helpful!  I'm really excited to see
progress on DST bugs!

Reply via email to