Package

org.specs2

text

Permalink

package text

Visibility
  1. Public
  2. All

Type Members

  1. case class AddedLine(line: NumberedLine) extends LineComparison with Product with Serializable

    Permalink
  2. final case class AnsiColor(color: String) extends AnyVal with Product with Serializable

    Permalink
  3. trait AnsiColors extends AnyRef

    Permalink

    This trait provides AnsiColors codes for the OutputReporter

    This trait provides AnsiColors codes for the OutputReporter

    See also

    http://en.wikipedia.org/wiki/ANSI_escape_code

  4. trait Colors extends AnyRef

    Permalink

    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

  5. trait ColorsMap extends AnyRef

    Permalink

    Definition of abbreviated color names

  6. class ConsoleColors extends AnsiColors with Colors

    Permalink

    This class defines the colors to use to print out text on the Console with defaults as AnsiColors for a dark background console

  7. trait ContentDifference extends AnyRef

    Permalink

    This trait represents the difference between 2 "contents"

  8. case class DeletedLine(line: NumberedLine) extends LineComparison with Product with Serializable

    Permalink
  9. trait DiffShortener extends AnyRef

    Permalink

    This object help shortening strings between differences when the strings are too long

  10. trait DifferenceFilter extends (Seq[LineComparison]) ⇒ Seq[LineComparison]

    Permalink

    A trait to filter results of a difference check

  11. trait DifferenceFilters extends AnyRef

    Permalink

    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)

  12. case class DifferencesClips(clipSize: Int = 4) extends DifferenceFilter with Product with Serializable

    Permalink

    return all only changes + some context

  13. case class DifferentLine(line1: NumberedLine, line2: NumberedLine) extends LineComparison with Product with Serializable

    Permalink
  14. case class FirstDifferences(n: Int) extends SomeDifferences with Product with Serializable

    Permalink

    return the first n differences

  15. trait FromString[T] extends AnyRef

    Permalink

    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

  16. class Interpolated extends InterpolatedParsers

    Permalink

    This class extracts interpolated expressions from an interpolated string, given the string content and the text pieces in between the interpolated expressions

  17. trait InterpolatedParsers extends JavaTokenParsers

    Permalink
  18. class InvertedColors extends ConsoleColors

    Permalink

    This color scheme can be used with a white background

  19. sealed trait LineComparison extends AnyRef

    Permalink

    case classes for the representation of lines which are different: not found, missing, misplaced

  20. trait LinesContent[L1] extends AnyRef

    Permalink

    Any type T with a name and representable as a sequence of Strings

  21. case class LinesContentDifference(lines1: Seq[String], lines2: Seq[String], all: Boolean = true, ordered: Boolean = true) extends ContentDifference with Product with Serializable

    Permalink

    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

  22. case class MappedColors(colors: Map[String, AnsiColor] = Map()) extends ConsoleColors with Product with Serializable

    Permalink

    This class takes colors from a map, using default colors if some values are missing

  23. trait NoDifferenceFilters extends DifferenceFilters

    Permalink

    mix-in this trait to remove the implicit provided by the DifferenceFilters trait

  24. case class NumberedLine(lineNumber: Int, line: String) extends Product with Serializable

    Permalink
  25. abstract class RegexExtractor[P, T] extends AnyRef

    Permalink

    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

  26. trait Regexes extends AnyRef

    Permalink

    This trait provides utility functions for working with regexes

  27. case class SameLine(line: NumberedLine) extends LineComparison with Product with Serializable

    Permalink
  28. trait Sentences extends AnyRef

    Permalink

    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

  29. case class SeqLinesContent[A, CC[_] <: Traversable[_]]() extends LinesContent[CC[A]] with Product with Serializable

    Permalink

    Default implementation for reading lines out of a Seq

  30. case class Show1[T1](show1: (T1) ⇒ String = _:T1).notNull) extends Product with Serializable

    Permalink
  31. case class Show10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10](show1: (T1) ⇒ String = _:T1).notNull, show2: (T2) ⇒ String = _:T2).notNull, show3: (T3) ⇒ String = _:T3).notNull, show4: (T4) ⇒ String = _:T4).notNull, show5: (T5) ⇒ String = _:T5).notNull, show6: (T6) ⇒ String = _:T6).notNull, show7: (T7) ⇒ String = _:T7).notNull, show8: (T8) ⇒ String = _:T8).notNull, show9: (T9) ⇒ String = _:T9).notNull, show10: (T10) ⇒ String = _:T10).notNull) extends Product with Serializable

    Permalink
  32. case class Show2[T1, T2](show1: (T1) ⇒ String = _:T1).notNull, show2: (T2) ⇒ String = _:T2).notNull) extends Product with Serializable

    Permalink
  33. case class Show3[T1, T2, T3](show1: (T1) ⇒ String = _:T1).notNull, show2: (T2) ⇒ String = _:T2).notNull, show3: (T3) ⇒ String = _:T3).notNull) extends Product with Serializable

    Permalink
  34. case class Show4[T1, T2, T3, T4](show1: (T1) ⇒ String = _:T1).notNull, show2: (T2) ⇒ String = _:T2).notNull, show3: (T3) ⇒ String = _:T3).notNull, show4: (T4) ⇒ String = _:T4).notNull) extends Product with Serializable

    Permalink
  35. case class Show5[T1, T2, T3, T4, T5](show1: (T1) ⇒ String = _:T1).notNull, show2: (T2) ⇒ String = _:T2).notNull, show3: (T3) ⇒ String = _:T3).notNull, show4: (T4) ⇒ String = _:T4).notNull, show5: (T5) ⇒ String = _:T5).notNull) extends Product with Serializable

    Permalink
  36. case class Show6[T1, T2, T3, T4, T5, T6](show1: (T1) ⇒ String = _:T1).notNull, show2: (T2) ⇒ String = _:T2).notNull, show3: (T3) ⇒ String = _:T3).notNull, show4: (T4) ⇒ String = _:T4).notNull, show5: (T5) ⇒ String = _:T5).notNull, show6: (T6) ⇒ String = _:T6).notNull) extends Product with Serializable

    Permalink
  37. case class Show7[T1, T2, T3, T4, T5, T6, T7](show1: (T1) ⇒ String = _:T1).notNull, show2: (T2) ⇒ String = _:T2).notNull, show3: (T3) ⇒ String = _:T3).notNull, show4: (T4) ⇒ String = _:T4).notNull, show5: (T5) ⇒ String = _:T5).notNull, show6: (T6) ⇒ String = _:T6).notNull, show7: (T7) ⇒ String = _:T7).notNull) extends Product with Serializable

    Permalink
  38. case class Show8[T1, T2, T3, T4, T5, T6, T7, T8](show1: (T1) ⇒ String = _:T1).notNull, show2: (T2) ⇒ String = _:T2).notNull, show3: (T3) ⇒ String = _:T3).notNull, show4: (T4) ⇒ String = _:T4).notNull, show5: (T5) ⇒ String = _:T5).notNull, show6: (T6) ⇒ String = _:T6).notNull, show7: (T7) ⇒ String = _:T7).notNull, show8: (T8) ⇒ String = _:T8).notNull) extends Product with Serializable

    Permalink
  39. case class Show9[T1, T2, T3, T4, T5, T6, T7, T8, T9](show1: (T1) ⇒ String = _:T1).notNull, show2: (T2) ⇒ String = _:T2).notNull, show3: (T3) ⇒ String = _:T3).notNull, show4: (T4) ⇒ String = _:T4).notNull, show5: (T5) ⇒ String = _:T5).notNull, show6: (T6) ⇒ String = _:T6).notNull, show7: (T7) ⇒ String = _:T7).notNull, show8: (T8) ⇒ String = _:T8).notNull, show9: (T9) ⇒ String = _:T9).notNull) extends Product with Serializable

    Permalink
  40. class SomeDifferences extends DifferenceFilter

    Permalink

    return some of the differences, filtered with a function

  41. trait StringEditDistance extends DiffShortener

    Permalink

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

  42. case class TextTable(header: Seq[String], lines: Seq[Seq[String]], separator: String = "|") extends Product with Serializable

    Permalink

    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

Value Members

  1. object AllDifferences extends SomeDifferences

    Permalink

    return all the differences

  2. object AnsiColors extends AnsiColors

    Permalink
  3. object ColorsMap extends ColorsMap

    Permalink
  4. object DiffShortener extends DiffShortener

    Permalink
  5. object FromString

    Permalink
  6. object Indent

    Permalink

    various functions for working out indentation

  7. object InterpolatedParsers extends InterpolatedParsers

    Permalink
  8. object LineComparison

    Permalink
  9. object MappedColors extends Serializable

    Permalink

    Factory method to create MappedColors 'colors' attribute

  10. object NumberedLine extends Serializable

    Permalink
  11. object RegexExtractor

    Permalink
  12. object Regexes extends Regexes

    Permalink
  13. object Sentences extends Sentences

    Permalink
  14. object ShowText

    Permalink
  15. object ShowTextGenerator

    Permalink
  16. object StringEditDistance extends StringEditDistance

    Permalink
  17. object TextTable extends Serializable

    Permalink

Ungrouped