emacs/test/lisp/progmodes/java-ts-mode-resources/movement.erts
Theodor Thornhill c8dd37b16c Add some basic tests for java-ts-mode and typescript-ts-mode
* test/lisp/progmodes/java-ts-mode-resources/indent.erts: New file
with tests for indentation.
* test/lisp/progmodes/java-ts-mode-resources/movement.erts: New file
with tests for movement.
* test/lisp/progmodes/java-ts-mode-tests.el: New tests.
* test/lisp/progmodes/typescript-ts-mode-resources/indent.erts: New
file with tests for indentation.
* test/lisp/progmodes/typescript-ts-mode-tests.el: New tests.
2023-01-16 14:33:27 +01:00

154 lines
1.9 KiB
Text

Code:
(lambda ()
(java-ts-mode)
(forward-sentence 1))
Point-Char: |
Name: forward-sentence moves over if
=-=
public class Basic {
public void basic() {
|if (x) {
}
log.info("some text: {}", text);
return;
}
}
=-=
public class Basic {
public void basic() {
if (x) {
}|
log.info("some text: {}", text);
return;
}
}
=-=-=
Name: forward-sentence moves over method invocation
=-=
public class Basic {
public void basic() {
|log.info("some text: {}", text);
}
}
=-=
public class Basic {
public void basic() {
log.info("some text: {}", text);|
}
}
=-=-=
Code:
(lambda ()
(java-ts-mode)
(forward-sentence 2))
Name: forward-sentence moves over multiple statements
=-=
public class Basic {
public void basic() {
|return;
return;
}
}
=-=
public class Basic {
public void basic() {
return;
return;|
}
}
=-=-=
Code:
(lambda ()
(java-ts-mode)
(backward-sentence 1))
Name: backward-sentence moves over one statement
=-=
public class Basic {
public void basic() {
return;|
}
}
=-=
public class Basic {
public void basic() {
|return;
}
}
=-=-=
Code:
(lambda ()
(java-ts-mode)
(beginning-of-defun))
Name: beginning-of-defun moves to defun start
=-=
public class Basic {
public void basic() {
return;|
}
}
=-=
public class Basic {
| public void basic() {
return;
}
}
=-=-=
Code:
(lambda ()
(java-ts-mode)
(beginning-of-defun)
(beginning-of-defun))
Name: beginning-of-defun moves to class
=-=
public class Basic {
public void basic() {
return;|
}
}
=-=
|public class Basic {
public void basic() {
return;
}
}
=-=-=
Code:
(lambda ()
(java-ts-mode)
(end-of-defun))
Name: end-of-defun moves to defun end
=-=
public class Basic {
public void basic() {
return;|
}
}
=-=
public class Basic {
public void basic() {
return;
}
|}
=-=-=