org.specs2.text
Type members
Classlikes
This trait provides AnsiColors codes for the OutputReporter
This trait provides AnsiColors codes for the OutputReporter
- See also:
- Companion:
- object
This trait defines the colors which can be used to output text on the console
This trait defines the colors which can be used to output text on the console
The textColor ... statsColor define the AnsiColor to use The text ... stats methods taking a String as a parameter are inserting control characters to change the string color
Definition of abbreviated color names
Definition of abbreviated color names
- Companion:
- object
This class defines the colors to use to print out text on the Console with defaults as AnsiColors for a dark background console
This class defines the colors to use to print out text on the Console with defaults as AnsiColors for a dark background console
This trait represents the difference between 2 "contents"
This trait represents the difference between 2 "contents"
This object help shortening strings between differences when the strings are too long
This object help shortening strings between differences when the strings are too long
- Companion:
- object
A trait to filter results of a difference check
A trait to filter results of a difference check
This trait provides some syntactic sugar to create a DifferenceFilter to take only the first n differences:
This trait provides some syntactic sugar to create a DifferenceFilter to take only the first n differences:
10.differences == FirstNDifferencesFilter(10)
return all only changes + some context
return all only changes + some context
return the first n differences
return the first n differences
This typeclass is used to describe any instance which can be decoded from a String.
This typeclass is used to describe any instance which can be decoded from a String.
It can be used to pass string properties in SystemProperties and decode them in a specific way
- Companion:
- object
various functions for working out indentation
various functions for working out indentation
This class extracts interpolated expressions from an interpolated string, given the string content and the text pieces in between the interpolated expressions
This class extracts interpolated expressions from an interpolated string, given the string content and the text pieces in between the interpolated expressions
This color scheme can be used with a white background
This color scheme can be used with a white background
case classes for the representation of lines which are different: not found, missing, misplaced
case classes for the representation of lines which are different: not found, missing, misplaced
- Companion:
- object
Any type T with a name and representable as a sequence of Strings
Any type T with a name and representable as a sequence of Strings
- Companion:
- object
This class shows the differences between 2 sequences of lines.
This class shows the differences between 2 sequences of lines.
- if all is false we expect possibly more lines in lines2
- if ordered is false we expect the lines of lines1 to appear in any order in lines2
- Companion:
- object
This class takes colors from a map, using default colors if some values are missing
This class takes colors from a map, using default colors if some values are missing
- Companion:
- object
Factory method to create MappedColors 'colors' attribute
Factory method to create MappedColors 'colors' attribute
- Companion:
- class
mix-in this trait to remove the implicit provided by the DifferenceFilters trait
mix-in this trait to remove the implicit provided by the DifferenceFilters trait
A Regular expression step which takes a text and extracts meaningful values according to a regular expression:
A Regular expression step which takes a text and extracts meaningful values according to a regular expression:
- either a user-defined expression for the full text to extract: e.g. "Given the following number: (.*)"
- or a default regex for groups capturing value delimited with
${}
It provides methods to extract either all the groups as a list, or a number of values as a tuple
- Companion:
- object
This trait provides utility functions for working with regexes
This trait provides utility functions for working with regexes
- Companion:
- object
This does some simple replacements in sentences to negate them.
This does some simple replacements in sentences to negate them.
For example: the cat must sleep => the cat must not sleep
- Companion:
- object
Default implementation for reading lines out of a Seq
Default implementation for reading lines out of a Seq
return some of the differences, filtered with a function
return some of the differences, filtered with a function
The EditDistance trait provides methods to compute and display the shortest distance between 2 strings.
The EditDistance trait provides methods to compute and display the shortest distance between 2 strings.
Usage:
showDistance("kitten", "sitting") // returns ("(k)itt(e)n", "(s)itt(i)n(g)") // with different separators showDistance("kitten", "sitting", "[]") // returns ("[k]itt[e]n", "[s]itt[i]n[g]")
- Companion:
- object
Textual representation of a table with a table and some lines.
Textual representation of a table with a table and some lines.
It is expected that the size of the header and all the lines are the same.
The main purpose of this class is to:
- display equal-length cells on each column
- allow line breaks in cells for each line
- Companion:
- object