branch: elpa/emacsql commit cf16cdb2f89c04813caf2af8d7bc1e474e9dd4a5 Author: Christopher Wellons <well...@nullprogram.com> Commit: Christopher Wellons <well...@nullprogram.com>
Add a special characters test. --- emacsql-tests.el | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/emacsql-tests.el b/emacsql-tests.el index e2e8d4841d..4172dd8ad5 100644 --- a/emacsql-tests.el +++ b/emacsql-tests.el @@ -254,6 +254,17 @@ (should-error (emacsql db [:create-table foo [x]]) :type 'emacsql-error)))) +(ert-deftest emacsql-special-chars () + "A short test that interacts with SQLite with special characters." + (let ((emacsql-global-timeout 4)) + (emacsql-with-connection (db (emacsql-sqlite nil)) + (emacsql db [:create-table test-table [x]]) + (emacsql db [:insert :into test-table + :values ([""] [\])]) + (should (process-live-p (emacsql-process db))) + (should (equal (emacsql db [:select * :from test-table]) + '(("") (\))))))) + (provide 'emacsql-tests) ;;; emacsql-tests.el ends here