This PR sets up the new integrated test/bench suite. It then migrates all benchmarks and some related tests to the new suite. There's also some documentation and some linting. For now, a lot of the old tests are left alone so this PR doesn't become even larger than it already is. Eventually, all tests should be migrated to the new suite though so there isn't a confusing mix of two systems.
39 lines
791 B
Text
39 lines
791 B
Text
/-!
|
|
# Test `String.crlfToLf`
|
|
-/
|
|
|
|
/-!
|
|
Leaves single `\n`'s alone.
|
|
-/
|
|
/-- info: "hello\nworld" -/
|
|
#guard_msgs in #eval String.crlfToLf "hello\nworld"
|
|
|
|
/-!
|
|
Turns `\r\n` into `\n`.
|
|
-/
|
|
/-- info: "hello\nworld" -/
|
|
#guard_msgs in #eval String.crlfToLf "hello\r\nworld"
|
|
|
|
/-!
|
|
In a string of `\r...\r\n`, only normalizes the last `\r\n`.
|
|
-/
|
|
/-- info: "hello\x0d\nworld" -/
|
|
#guard_msgs in #eval String.crlfToLf "hello\r\r\nworld"
|
|
|
|
/-!
|
|
Two in a row.
|
|
-/
|
|
/-- info: "hello\n\nworld" -/
|
|
#guard_msgs in #eval String.crlfToLf "hello\r\n\r\nworld"
|
|
|
|
/-!
|
|
Normalizes at the end.
|
|
-/
|
|
/-- info: "hello\nworld\n" -/
|
|
#guard_msgs in #eval String.crlfToLf "hello\r\nworld\r\n"
|
|
|
|
/-!
|
|
Can handle a loose `\r` as the last character.
|
|
-/
|
|
/-- info: "hello\nworld\x0d" -/
|
|
#guard_msgs in #eval String.crlfToLf "hello\r\nworld\r"
|