diff options
| author | Micah Chalmer <micah@micahchalmer.net> | 2015-02-23 01:53:56 -0500 |
|---|---|---|
| committer | Micah Chalmer <micah@micahchalmer.net> | 2015-02-23 01:53:56 -0500 |
| commit | 52febe93a0b15740a3891855701555af404953ba (patch) | |
| tree | 59831030dcd1a5d02d50b517c29c5fc14221ceab /rust-mode-tests.el | |
| parent | d6b173995b8d9c4f43124e639861ac615002a1a0 (diff) | |
| download | rust-mode-52febe93a0b15740a3891855701555af404953ba.tar.gz | |
Add a few more tests for indents inside strings
Diffstat (limited to 'rust-mode-tests.el')
| -rw-r--r-- | rust-mode-tests.el | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/rust-mode-tests.el b/rust-mode-tests.el index 310eeaf..007d116 100644 --- a/rust-mode-tests.el +++ b/rust-mode-tests.el @@ -1290,3 +1290,39 @@ And another line not indented \") } ")) + +(ert-deftest test-indent-string-eol-backslash-dont-touch-raw-strings () + (test-indent + " +pub fn foo() { + format!(r\"\ +abc\ + def\"); +} + +pub fn foo() { + format!(r\"la la la + la\ +la la\"); +} +" + ;; Should still indent the code parts but leave the string internals alone: + " + pub fn foo() { + format!(r\"\ +abc\ + def\"); +} + +pub fn foo() { + format!(r\"la la la + la\ +la la\"); +} +" + )) + +(ert-deftest indent-inside-string-first-line () + (test-indent + ;; Needs to leave 1 space before "world" + "\"hello \\\n world\"")) |
