• Stephen Gildea's avatar
    Expand time-stamp unit tests to cover all formatting options · a33cda16
    Stephen Gildea authored
    * time-stamp-tests.el: Expand unit tests to cover all formatting options.
    These tests validate time-stamp-pattern formatting that has existed
    since at least Emacs 22 (released in 2007).  The tests cover both
    documented behavior and behavior implemented to support future migrations.
    
    * time-stamp.el (time-stamp-string): Add a second argument (TIME) to
    open a testing seam.  Have the unit tests call this public function.
    
    * time-stamp.el (time-stamp-string, time-stamp-string-preprocess):
    Remove the second pass through time-string--format.  (Previously both
    functions called it.)  It was used only to handle "%", but this is now
    handled by having time-stamp-string-preprocess not double it.
    Not doubling the "%" in time-stamp-string-preprocess fixes the padding
    of "%2%", which was discovered by the new unit tests to be wrong.
    a33cda16
time-stamp-tests.el 14.2 KB