diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-05-14 04:00:22 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-05-14 04:00:22 +0100 |
commit | a64517889ae341f6c77a299cd3aecdcfcf1694f6 (patch) | |
tree | 410993b950943be906cf07547eb28561772ac995 /app-emacs/ts | |
parent | a0e652963f4d02b0e7c1148509f4ce3327c83808 (diff) |
gentoo auto-resync : 14:05:2023 - 04:00:22
Diffstat (limited to 'app-emacs/ts')
-rw-r--r-- | app-emacs/ts/Manifest | 2 | ||||
-rw-r--r-- | app-emacs/ts/files/ts-0.3-test.patch | 105 |
2 files changed, 97 insertions, 10 deletions
diff --git a/app-emacs/ts/Manifest b/app-emacs/ts/Manifest index 4bfe3a5ca106..2fc1442727bd 100644 --- a/app-emacs/ts/Manifest +++ b/app-emacs/ts/Manifest @@ -1,5 +1,5 @@ AUX 50ts-gentoo.el 38 BLAKE2B e96c6cf48d1522d89450e11d339c76210c672377208b56951791b83c6ef22b2c872d313084e199dd5d7b533a99106a87dbc7f15b5ee6126f71bf5f2e84165ffa SHA512 5c00bcabe2d7cc03013dc7a54b2c653940c08098ca5646d7c73624cb1ca04376ae9dcf88a7166b1925c69f0c5d192d90f6bd790fdef8ed8c3b0f9d163c987da5 -AUX ts-0.3-test.patch 650 BLAKE2B 174a01b8035a677e2ae742931ac9b9d9f7eadd9a0bd02ffda69867c950239c32e948b952d6a16ffcd4ea423b84b8eec4d20a8000bddc4ef64e072e29fccfa203 SHA512 0276582170693f476c448dc6154b4930a52734ddf8325a903b018f3aca8e7d16ba150d1ef50f61e541ed234b2097c2b9f7d048f74cf058a6c088070c3722e2de +AUX ts-0.3-test.patch 4234 BLAKE2B 5ecaa201c552f899a30998e3d2d313368a9f8d850ee42b8ba774ab695fac1057f5f4133e1da5dea777a60d0001e722860f856a8eddb789f4a6e17aa87178eb0b SHA512 b57f760adf3c3eeef0c227956ea273eedd6b3492ab1b4347b64738cd1d5c1e8fb94b4cc4903022cb44fc9688791209a67e09c8ccdf3c256f58d4e4bfad2ed565 DIST ts-0.3.tar.gz 50790 BLAKE2B 99708218584764776d6f93565b7da83e266a1ea2588aba614151a9cffaddd69983a0dd897b9a59247e73992b1611dc761f250f189e179d72c36dc417f5f60aa2 SHA512 8e31543ffb69214c2daf3a26b8f2a76c9933e13f699575678c3262b1524da6615d34ec3fe9d30c62c354ba7139e7a96ac5a894850569688e75ba64959bded61c EBUILD ts-0.3.ebuild 855 BLAKE2B 75054d6ba86495a1bad1c8badb0a73e0e51c6043dc16afc4168920c9292fcbf7dc42432da4ae56674fcb41b2d25bf784f80d3ff8c5e824aa60765538d17f3b25 SHA512 d9551b5b1ada56b9581bcacaa85b9458e0dc27988f970d6f08c9c51a3b664ebe6bba798e7c54261f1f69568ad0bc3f6159bf4a088d978879febda7ee2f45b7f5 MISC metadata.xml 1017 BLAKE2B bd37ba7901c48fef2cbfd665f2785a83b4bb2a3c0ff96177f7e6e4248efbc4698347fbce7f14e1ef6f77de3d4d9b0d267bcbef5d1a396f1dfd82a634b2c6ddee SHA512 a3b39642f71c692f2e68e96b96dbe2cf25cb014734c0ade0026a839eb15a2265d69203e76b3c707763f7710de9f93b3df822e1ca141d5ce86c8c3056f8ad5a9b diff --git a/app-emacs/ts/files/ts-0.3-test.patch b/app-emacs/ts/files/ts-0.3-test.patch index 0b473d24873f..387d7555a79e 100644 --- a/app-emacs/ts/files/ts-0.3-test.patch +++ b/app-emacs/ts/files/ts-0.3-test.patch @@ -1,13 +1,100 @@ --- a/test/test.el +++ b/test/test.el -@@ -259,10 +259,8 @@ - ;; machine's local timezone affecting results. - (let ((ts (make-ts :year 2019 :month 7 :day 27 :hour 20 :minute 48 :second 08 :tz-offset "-0400"))) - ;; Following the pattern in the function: +@@ -254,24 +254,6 @@ + + ;;;;; Formatting + +-(ert-deftest ts-format () +- ;; We test two timestamps to help avoid problems with the test +- ;; machine's local timezone affecting results. +- (let ((ts (make-ts :year 2019 :month 7 :day 27 :hour 20 :minute 48 :second 08 :tz-offset "-0400"))) +- ;; Following the pattern in the function: - (should (equal (ts-format ts) "2019-07-27 20:48:08 -0400")) - (should (equal (ts-format "%Y" ts) "2019")) - (should (ts-format "%Y")) +- (should (equal (ts-format "%Y" ts) "2019")) +- (should (ts-format "%Y")) - (should (equal (ts-format nil ts) "2019-07-27 20:48:08 -0400")) - (should (ts-format))) - (let ((ts (make-ts :year 2019 :month 7 :day 27 :hour 19 :minute 48 :second 08 :tz-offset "-0500"))) - ;; Following the pattern in the function: +- (should (ts-format))) +- (let ((ts (make-ts :year 2019 :month 7 :day 27 :hour 19 :minute 48 :second 08 :tz-offset "-0500"))) +- ;; Following the pattern in the function: +- (should (equal (ts-format ts) "2019-07-27 19:48:08 -0500")) +- (should (equal (ts-format "%Y" ts) "2019")) +- (should (ts-format "%Y")) +- (should (equal (ts-format nil ts) "2019-07-27 19:48:08 -0500")) +- (should (ts-format)))) +- + ;;;;; Parsing + + (ert-deftest ts-parse () +@@ -355,13 +337,6 @@ + ;; 12:12, which means 0 seconds. + (should (eq (ts-S ts) 0)))) + +-(ert-deftest ts-parse-org () +- ;; NOTE: Not sure how to best handle loading `org-parse-time-string'. Calling (require 'ts) +- ;; shouldn't cause Org to be loaded, so the user will probably have to do that. +- (require 'org) +- (let* ((org-ts-string "<2015-09-24 Thu .+1d>")) +- (should (equal 1443070800.0 (ts-unix (ts-parse-org org-ts-string)))))) +- + (ert-deftest ts-parse-org-fill () + (should-error (ts-parse-org-fill nil "<2015-09-24 Thu .+1d>")) + (let ((ts (ts-parse-org-fill 'begin "<2015-09-24 Thu .+1d>"))) +@@ -413,27 +388,6 @@ + (should (eq (ts-M ts) 12)) + (should (eq (ts-S ts) 0)))) + +-(ert-deftest ts-parse-org-element () +- (let ((org-ts '(timestamp (:type active +- :raw-value "<2015-09-24 Thu .+1d>" +- :year-start 2015 :month-start 9 :day-start 24 +- :hour-start nil :minute-start nil +- :year-end 2015 :month-end 9 :day-end 24 +- :hour-end nil :minute-end nil +- :begin 230314 :end 230335 :post-blank 0 +- :repeater-type restart :repeater-value 1 :repeater-unit day)))) +- (should (equal 1443070800.0 (ts-unix (ts-parse-org-element org-ts))))) +- (let ((org-ts-string "<2015-09-24 Thu .+1d>")) +- (with-temp-buffer +- (delay-mode-hooks +- (org-mode) +- (save-excursion +- (insert org-ts-string)) +- (should (->> (org-element-context) +- (ts-parse-org-element) +- (ts-unix) +- (equal 1443070800.0))))))) +- + ;;;;; Other + + (ert-deftest ts-apply () +@@ -443,30 +397,6 @@ + (should (= (- (ts-year now) (ts-year then)) + expected-difference)))) + +-(ert-deftest ts-fill () +- (let ((zones '("America/Chicago" (-18000 "CDT"))) +- ts) +- (dolist (zone zones) +- (setf ts (ts-fill (make-ts :unix 1625426636.7569551) zone)) +- (should (equal (ts-year ts) 2021)) +- (should (equal (ts-month-num ts) 7)) +- (should (equal (ts-day-of-month-num ts) 4)) +- (should (equal (ts-day-of-week-num ts) 0)) +- (should (equal (ts-hour ts) 14)) +- (should (equal (ts-minute ts) 23)) +- (should (equal (ts-second ts) 56)) +- (should (equal (ts-month-name ts) "July")) +- (should (equal (ts-month-abbr ts) "Jul")) +- (should (equal (ts-day-abbr ts) "Sun")) +- (should (equal (ts-day-name ts) "Sunday")) +- (should (equal (ts-day-of-year ts) 185)) +- (should (equal (ts-week-of-year ts) 26)) +- (should (equal (ts-tz-abbr ts) "CDT")) +- (should (equal (ts-tz-offset ts) "-0500")))) +- ;; If ZONE is the plain integer -18000, the tz-abbr ("%z" to `format-time-string') +- ;; is "-05" rather than the zone abbreviation, so we test it separately. +- (should (equal (ts-tz-abbr (ts-fill (make-ts :unix 1625426636.7569551) -18000)) "-05"))) +- + (ert-deftest ts-now () + "Ensure `ts-now' returns what appears to be the current time." + (should (equal (floor (ts-unix (ts-now))) |