We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1a20720 commit cb48487Copy full SHA for cb48487
1 file changed
test/sqlup-mode-test.el
@@ -0,0 +1,19 @@
1
+(provide 'sqlup-mode)
2
+
3
+;; TODO figure out how to write this
4
+;; (ert-deftest upcase-select ()
5
+;; (with-temp-buffer
6
+;; (sqlup-mode)
7
+;; (insert "select")
8
+;; ;; (execute-kbd-macro (kbd "SPC"))
9
+;; (call-interactively (global-key-binding (kbd "SPC")))
10
+;; (message "|%s|" (buffer-string))
11
+;; (should (equal (buffer-string) "SELECT "))))
12
13
+(ert-deftest upcase-a-region ()
14
+ (with-temp-buffer
15
+ (goto-char (point-min))
16
+ (insert "select count(*) from 'select' -- select")
17
+ (set-mark (point-min))
18
+ (call-interactively 'sqlup-capitalize-keywords-in-region)
19
+ (should (equal (buffer-string) "SELECT COUNT(*) FROM 'select' -- select"))))
0 commit comments