aboutsummaryrefslogtreecommitdiffstats
path: root/test/src
diff options
context:
space:
mode:
authorPo Lu2023-05-27 09:49:49 +0800
committerPo Lu2023-05-27 09:49:49 +0800
commitcdca0fddcc3352bcd01bec147c264be1b2a04e12 (patch)
tree3b15e37936fecc34314883a41a355873c2b9133c /test/src
parent0eb1f4e57125117006f109a5549082008fc9fbb1 (diff)
parente77e986a9b7d735c0e39198c8b80a34a29005fc5 (diff)
downloademacs-cdca0fddcc3352bcd01bec147c264be1b2a04e12.tar.gz
emacs-cdca0fddcc3352bcd01bec147c264be1b2a04e12.zip
Merge remote-tracking branch 'origin/master' into feature/android
Diffstat (limited to 'test/src')
-rw-r--r--test/src/lread-tests.el16
-rw-r--r--test/src/sqlite-tests.el23
-rw-r--r--test/src/treesit-tests.el2
3 files changed, 31 insertions, 10 deletions
diff --git a/test/src/lread-tests.el b/test/src/lread-tests.el
index fc00204ce7b..eae4893ee1b 100644
--- a/test/src/lread-tests.el
+++ b/test/src/lread-tests.el
@@ -360,4 +360,20 @@ literals (Bug#20852)."
360 (should (byte-code-function-p f)) 360 (should (byte-code-function-p f))
361 (should (equal (aref f 4) "My little\ndoc string\nhere")))))) 361 (should (equal (aref f 4) "My little\ndoc string\nhere"))))))
362 362
363(ert-deftest lread-skip-to-eof ()
364 ;; Check the special #@00 syntax that, for compatibility, reads as
365 ;; nil while absorbing the remainder of the input.
366 (with-temp-buffer
367 (insert "#@00 and the rest\n"
368 "should be ignored) entirely\n")
369 (goto-char (point-min))
370 (should (equal (read (current-buffer)) nil))
371 (should (eobp))
372 ;; Add an unbalanced bracket to the beginning and try again;
373 ;; we should get an error.
374 (goto-char (point-min))
375 (insert "( ")
376 (goto-char (point-min))
377 (should-error (read (current-buffer)) :type 'end-of-file)))
378
363;;; lread-tests.el ends here 379;;; lread-tests.el ends here
diff --git a/test/src/sqlite-tests.el b/test/src/sqlite-tests.el
index 460651def78..f7144c15887 100644
--- a/test/src/sqlite-tests.el
+++ b/test/src/sqlite-tests.el
@@ -197,10 +197,13 @@
197 (sqlite-load-extension db "/usr/lib/sqlite3/")) 197 (sqlite-load-extension db "/usr/lib/sqlite3/"))
198 (should-error 198 (should-error
199 (sqlite-load-extension db "/usr/lib/sqlite3")) 199 (sqlite-load-extension db "/usr/lib/sqlite3"))
200 (should 200 (if (eq system-type 'windows-nt)
201 (memq 201 (should
202 (sqlite-load-extension db "/usr/lib/sqlite3/pcre.so") 202 (eq (sqlite-load-extension db "/usr/lib/sqlite3/pcre.dll")
203 '(nil t))) 203 (file-readable-p "/usr/lib/sqlite3/pcre.dll")))
204 (should
205 (eq (sqlite-load-extension db "/usr/lib/sqlite3/pcre.so")
206 (file-readable-p "/usr/lib/sqlite3/pcre.so"))))
204 207
205 (should-error 208 (should-error
206 (sqlite-load-extension 209 (sqlite-load-extension
@@ -211,11 +214,13 @@
211 (should-error 214 (should-error
212 (sqlite-load-extension 215 (sqlite-load-extension
213 db "/usr/lib/x86_64-linux-gnu/libsqlite3_mod_csvtable")) 216 db "/usr/lib/x86_64-linux-gnu/libsqlite3_mod_csvtable"))
214 (should 217 (if (eq system-type 'windows-nt)
215 (memq 218 (should
216 (sqlite-load-extension 219 (eq (sqlite-load-extension db "/usr/lib/sqlite3/csvtable.dll")
217 db "/usr/lib/x86_64-linux-gnu/libsqlite3_mod_csvtable.so") 220 (file-readable-p "/usr/lib/sqlite3/csvtable.dll")))
218 '(nil t))))) 221 (should
222 (eq (sqlite-load-extension db "/usr/lib/x86_64-linux-gnu/libsqlite3_mod_csvtable.so")
223 (file-readable-p "/usr/lib/x86_64-linux-gnu/libsqlite3_mod_csvtable.so"))))))
219 224
220(ert-deftest sqlite-blob () 225(ert-deftest sqlite-blob ()
221 (skip-unless (sqlite-available-p)) 226 (skip-unless (sqlite-available-p))
diff --git a/test/src/treesit-tests.el b/test/src/treesit-tests.el
index 4aa81a9ce0b..7a8e53924eb 100644
--- a/test/src/treesit-tests.el
+++ b/test/src/treesit-tests.el
@@ -69,7 +69,7 @@
69 (should 69 (should
70 (equal (treesit-node-string 70 (equal (treesit-node-string
71 (treesit-parser-root-node parser)) 71 (treesit-parser-root-node parser))
72 "(ERROR)")) 72 "(document)"))
73 73
74 (insert "[1,2,3]") 74 (insert "[1,2,3]")
75 (should 75 (should