org.specs2.text

package org.specs2.text

Members list

Type members

Classlikes

case class AddedLine(line: NumberedLine) extends LineComparison

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

return all the differences

return all the differences

Attributes

Supertypes
trait Seq[LineComparison] => Seq[LineComparison]
class Object
trait Matchable
class Any
Show all
Self type
final case class AnsiColor(color: String) extends AnyVal

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class AnyVal
trait Matchable
class Any
Show all
trait AnsiColors

This trait provides AnsiColors codes for the OutputReporter

This trait provides AnsiColors codes for the OutputReporter

Attributes

See also
Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object AnsiColors.type
class MappedColors
Self type
object AnsiColors extends AnsiColors

Attributes

Companion
trait
Supertypes
trait AnsiColors
class Object
trait Matchable
class Any
Self type
AnsiColors.type
trait Colors

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

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait ColorsMap

Definition of abbreviated color names

Definition of abbreviated color names

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object ColorsMap.type
object ColorsMap extends ColorsMap

Attributes

Companion
trait
Supertypes
trait ColorsMap
class Object
trait Matchable
class Any
Self type
ColorsMap.type

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

Attributes

Supertypes
trait Colors
trait AnsiColors
class Object
trait Matchable
class Any
Known subtypes

This trait represents the difference between 2 "contents"

This trait represents the difference between 2 "contents"

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
case class DeletedLine(line: NumberedLine) extends LineComparison

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

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

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object DiffShortener.type
object StringEditDistance.type
object DiffShortener extends DiffShortener

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
trait DifferenceFilter extends Seq[LineComparison] => Seq[LineComparison]

A trait to filter results of a difference check

A trait to filter results of a difference check

Attributes

Supertypes
trait Seq[LineComparison] => Seq[LineComparison]
class Object
trait Matchable
class Any
Known subtypes

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)

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
case class DifferencesClips(clipSize: Int) extends DifferenceFilter

return all only changes + some context

return all only changes + some context

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait Seq[LineComparison] => Seq[LineComparison]
class Object
trait Matchable
class Any
Show all
case class DifferentLine(line1: NumberedLine, line2: NumberedLine) extends LineComparison

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class FirstDifferences(n: Int) extends SomeDifferences

return the first n differences

return the first n differences

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait Seq[LineComparison] => Seq[LineComparison]
class Object
trait Matchable
class Any
Show all
trait FromString[T]

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

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object FromString

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
FromString.type
object Indent

various functions for working out indentation

various functions for working out indentation

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Indent.type

This color scheme can be used with a white background

This color scheme can be used with a white background

Attributes

Supertypes
trait Colors
trait AnsiColors
class Object
trait Matchable
class Any
Show all
sealed trait LineComparison

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

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class AddedLine
class DeletedLine
class SameLine

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
trait LinesContent[L1]

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

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
object FileLinesContent.type
class SeqLinesContent[A, CC]
case class LinesContentDifference(lines1: Seq[String], lines2: Seq[String], all: Boolean, ordered: Boolean) extends ContentDifference

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

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
case class MappedColors(colors: Map[String, AnsiColor]) extends ConsoleColors

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

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
trait Colors
trait AnsiColors
class Object
trait Matchable
class Any
Show all
Self type
object MappedColors

Factory method to create MappedColors 'colors' attribute

Factory method to create MappedColors 'colors' attribute

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type

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

Attributes

Supertypes
class Object
trait Matchable
class Any
case class NumberedLine(lineNumber: Int, line: String)

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object NumberedLine

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
abstract class RegexExtractor[P, T](var fullRegex: String, var groupRegex: String)

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

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
trait Regexes

This trait provides utility functions for working with regexes

This trait provides utility functions for working with regexes

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Regexes.type
object Regexes extends Regexes

Attributes

Companion
trait
Supertypes
trait Regexes
class Object
trait Matchable
class Any
Self type
Regexes.type
case class SameLine(line: NumberedLine) extends LineComparison

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
trait Sentences

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

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Sentences.type
object Sentences extends Sentences

Attributes

Companion
trait
Supertypes
trait Sentences
class Object
trait Matchable
class Any
Self type
Sentences.type
case class SeqLinesContent[A, CC <: (Iterable)]() extends LinesContent[CC[A]]

Default implementation for reading lines out of a Seq

Default implementation for reading lines out of a Seq

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait LinesContent[CC[A]]
class Object
trait Matchable
class Any
Show all
open case class Show1[T1](show1: T1 => String)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class Show10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10](show1: T1 => String, show2: T2 => String, show3: T3 => String, show4: T4 => String, show5: T5 => String, show6: T6 => String, show7: T7 => String, show8: T8 => String, show9: T9 => String, show10: T10 => String)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
open case class Show2[T1, T2](show1: T1 => String, show2: T2 => String)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
open case class Show3[T1, T2, T3](show1: T1 => String, show2: T2 => String, show3: T3 => String)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
open case class Show4[T1, T2, T3, T4](show1: T1 => String, show2: T2 => String, show3: T3 => String, show4: T4 => String)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
open case class Show5[T1, T2, T3, T4, T5](show1: T1 => String, show2: T2 => String, show3: T3 => String, show4: T4 => String, show5: T5 => String)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
open case class Show6[T1, T2, T3, T4, T5, T6](show1: T1 => String, show2: T2 => String, show3: T3 => String, show4: T4 => String, show5: T5 => String, show6: T6 => String)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
open case class Show7[T1, T2, T3, T4, T5, T6, T7](show1: T1 => String, show2: T2 => String, show3: T3 => String, show4: T4 => String, show5: T5 => String, show6: T6 => String, show7: T7 => String)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
open case class Show8[T1, T2, T3, T4, T5, T6, T7, T8](show1: T1 => String, show2: T2 => String, show3: T3 => String, show4: T4 => String, show5: T5 => String, show6: T6 => String, show7: T7 => String, show8: T8 => String)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
open case class Show9[T1, T2, T3, T4, T5, T6, T7, T8, T9](show1: T1 => String, show2: T2 => String, show3: T3 => String, show4: T4 => String, show5: T5 => String, show6: T6 => String, show7: T7 => String, show8: T8 => String, show9: T9 => String)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object ShowText

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
ShowText.type

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

return some of the differences, filtered with a function

return some of the differences, filtered with a function

Attributes

Supertypes
trait Seq[LineComparison] => Seq[LineComparison]
class Object
trait Matchable
class Any
Known subtypes
object AllDifferences.type

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]")

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object StringEditDistance.type

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
case class TextTable(header: Seq[String], lines: Seq[Seq[String]], separator: String)

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

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object TextTable

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
TextTable.type
object Whitespace

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Whitespace.type