Commit Graph

15 Commits

Author SHA1 Message Date
Nick Cameron 4f522794ae Tidy up and pass tests 2018-03-02 15:07:13 +13:00
topecongiro 4af2aa3a9e Create rustfmt_core crate 2018-02-07 22:48:05 +09:00
Nick Cameron 4cb474b5ee Remove force_format_strings in favour of format_strings 2017-11-24 14:07:37 +13:00
topecongiro bdcd36e677 Add a test for #1987 2017-10-01 20:30:32 +09:00
Sebastian Blunt 235f33b230 Make tests fail if rustfmt encounters an error
Previously tests would not fail if they encountered an error such as
LineOverflow or TrailingWhitespace. Making the tests error out will fix
this mismatch between running rustfmt for real and running the tests.

This also modifies all tests that previously contained errors so that
they no longer contain errors (in almost all of the tests this is
accomplished by setting error_on_line_overflow = false).
2017-02-19 19:57:02 +01:00
Nick Cameron 1f3100d7bb Make string lit formatting fallible
This allows expressions containing string lits to wrap their content

Fixes #1282
2017-01-27 08:04:52 +13:00
Nick Cameron 02302d2800 Don't reformat strings if we don't have to.
Specifically if no line exceeds the allowed width and we aren't moving the string to a new offset
2016-01-28 19:14:08 +13:00
Marcus Klaas 1e80fd2dcd Prevent incorrect backslash removal in strings 2015-12-25 18:50:40 +01:00
Marcus Klaas 8cccf45d43 Prevent backslash stripping in string literals 2015-12-12 16:25:01 +01:00
Marcus Klaas 9734bd05af Add regression test for backslash stripping 2015-12-02 21:03:41 +01:00
Marcus Klaas 7f576b0602 General cleanup after rebase 2015-09-11 00:53:21 +02:00
Sinh Pham 61f642f6f8 Support unicode in string literals. 2015-09-03 23:41:25 -04:00
Marcus Klaas 1ae2d417b8 Remove faulty shortcut in rewrite_string_lit
Rustfmt would leave the literal unchanged when it did not exceed the column limit in its original position, not considering its position after formatting.
2015-09-01 20:42:07 +02:00
Léo Stefanesco 8b78568388 Add test for raw strings 2015-08-22 21:20:31 +02:00
Marcus Klaas 963eafe94a Add tests for string literal formatting 2015-06-15 21:37:27 +02:00