To add a collaborator to this project you will need to use the Relish gem to add the collaborator via a terminal command. Soon you'll be able to also add collaborators here!
More about adding a collaboratorTrim line
- Scenarios
-
- Trimming a single line
- Trimming a selection
- Trimming a line with unicode
- Trimming a line with Windows line endings
- Trimming empty line removes newline character
- Trimming empty line removes newline character (Windows)
- Trimming when at end of line removes newline character
- Trimming when at end of file and newline absent it does nothing
- Trimming when just before last newline character it removes it
- Trimming when at end of file and newline present it does nothing
- Trimming a single line
-
- When
- I open a new edit tab
- And
- I replace the contents with "Once upon a time"
- And
- I move the cursor to 4
- And
- I trim the line
- Then
- I should see "Once" in the edit tab
- And
- I should not see "upon a time" in the edit tab
- Trimming a selection
-
- When
- I open a new edit tab
- And
- I replace the contents with "Once upon a time"
- And
- I select from 5 to 9
- And
- I trim the line
- Then
- I should see "Once " in the edit tab
- And
- I should not see "upon a time" in the edit tab
- Trimming a line with unicode
-
- When
- I open a new edit tab
- And
- I replace the contents with "foo\nbść\nbaz"
- And
- I move the cursor to 5
- And
- I trim the line
- Then
- the contents should be "foo\nb\nbaz"
- Trimming a line with Windows line endings
-
- When
- I open a new edit tab
- And
- I replace the contents with "foo\r\nbść\r\nbaz"
- And
- I move the cursor to 6
- And
- I trim the line
- Then
- the contents should be "foo\r\nb\r\nbaz"
- Trimming empty line removes newline character
-
- When
- I open a new edit tab
- And
- I replace the contents with "foo\n\nbaz"
- And
- I move the cursor to 4
- And
- I trim the line
- Then
- the contents should be "foo\nbaz"
- Trimming empty line removes newline character (Windows)
-
- When
- I open a new edit tab
- And
- I replace the contents with "foo\r\n\r\nbaz"
- And
- I move the cursor to 5
- And
- I trim the line
- Then
- the contents should be "foo\r\nbaz"
- Trimming when at end of line removes newline character
-
- When
- I open a new edit tab
- And
- I replace the contents with "foo\nbść\nbaz"
- And
- I move the cursor to 7
- And
- I trim the line
- Then
- the contents should be "foo\nbśćbaz"
- Trimming when at end of file and newline absent it does nothing
-
- When
- I open a new edit tab
- And
- I replace the contents with "foo\nbść\nbaz"
- And
- I move the cursor to 11
- And
- I trim the line
- Then
- the contents should be "foo\nbść\nbaz"
- Trimming when just before last newline character it removes it
-
- When
- I open a new edit tab
- And
- I replace the contents with "foo\nbść\nbaz\n"
- And
- I move the cursor to 11
- And
- I trim the line
- Then
- the contents should be "foo\nbść\nbaz"
- Trimming when at end of file and newline present it does nothing
-
- When
- I open a new edit tab
- And
- I replace the contents with "foo\nbść\nbaz\n"
- And
- I move the cursor to 12
- And
- I trim the line
- Then
- the contents should be "foo\nbść\nbaz\n"
Last published almost 7 years ago by danlucraft.