summaryrefslogtreecommitdiff
path: root/test/lisp/textmodes/dns-mode-tests.el
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-08-19 16:48:59 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-08-19 16:48:59 -0700
commit07fcbb558d797272b9f43547da60beda485873a3 (patch)
tree77d5da14e9f9d9d8b1d877c70c01296fd3893796 /test/lisp/textmodes/dns-mode-tests.el
parentc9bdeff3e45a7ac84a74a81bb048046f82dddc91 (diff)
parentfb81c8c3adf8633f2f617c82f6019aef630860c7 (diff)
downloademacs-07fcbb558d797272b9f43547da60beda485873a3.tar.gz
Merge remote-tracking branch 'origin/master' into athena/unstable
Diffstat (limited to 'test/lisp/textmodes/dns-mode-tests.el')
-rw-r--r--test/lisp/textmodes/dns-mode-tests.el21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/lisp/textmodes/dns-mode-tests.el b/test/lisp/textmodes/dns-mode-tests.el
index 694d683d546..8bc48732c62 100644
--- a/test/lisp/textmodes/dns-mode-tests.el
+++ b/test/lisp/textmodes/dns-mode-tests.el
@@ -25,6 +25,27 @@
(require 'ert)
(require 'dns-mode)
+(ert-deftest dns-mode-tests-dns-mode-soa-increment-serial ()
+ (with-temp-buffer
+ (insert "$TTL 86400
+@ IN SOA ns.icann.org. noc.dns.icann.org. (
+ 2015080302 ;Serial
+ 7200 ;Refresh
+ 3600 ;Retry
+ 1209600 ;Expire
+ 3600 ;Negative response caching TTL\n)")
+ (dns-mode-soa-increment-serial)
+ ;; Number is updated from 2015080302 to the current date
+ ;; (actually, just ensure the year part is later than 2020).
+ (should (string-match "\\$TTL 86400
+@ IN SOA ns.icann.org. noc.dns.icann.org. (
+ 20[2-9][0-9]+ ;Serial
+ 7200 ;Refresh
+ 3600 ;Retry
+ 1209600 ;Expire
+ 3600 ;Negative response caching TTL\n)"
+ (buffer-string)))))
+
;;; IPv6 reverse zones
(ert-deftest dns-mode-ipv6-conversion ()
(let ((address "2001:db8::42"))