pretty

package module
v0.0.0-...-99fc86d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2020 License: MIT Imports: 9 Imported by: 0

README

Build Status

Cucumber Pretty Formatter

This formatter pretty-prints Feature files.

It's a simple command line program that reads results from STDIN and writes the result to STDOUT.

The STDIN must contain varint-delimited protobuf messages.

Building

Just one command:

make .deps

This should download dependencies, run tests and build the executable.

Trying it out

The tests leave behind *.bin files, which contain protobuf messages. They can be piped to the executable to see the result:

cat all-results.bin | bin/cucumber-pretty-formatter

Design

The formatter can operate in two modes:

  • Without results (for pretty formatting source code)
  • With results (for pretty formatting results as source code)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProcessMessages

func ProcessMessages(stdin io.Reader, writer io.Writer, resultsMode bool)

Types

type DocumentPrinter

type DocumentPrinter struct {
	ScenarioPrinters map[string]*ScenarioPrinter
	StepPrinters     map[string]*StepPrinter
	Doc              *messages.GherkinDocument
	Writer           io.Writer
	Comments         []*messages.Comment
	ResultsMode      bool
}

type KeywordNode

type KeywordNode interface {
	GetKeyword() string
	GetName() string
}

type PicklePrinter

type PicklePrinter struct {
	Pickle           *messages.Pickle
	ScenarioPrinters map[string]*ScenarioPrinter
	StepPrinters     map[string]*StepPrinter
	Writer           io.Writer
}

type ScenarioPrinter

type ScenarioPrinter struct {
	Scenario    *messages.Scenario
	Uri         string
	Writer      io.Writer
	ResultsMode bool
}

type StepPrinter

type StepPrinter struct {
	Step        *messages.Step
	Uri         string
	Writer      io.Writer
	ResultsMode bool
}

type TablePrinter

type TablePrinter struct {
	Rows   []*messages.TableRow
	Writer io.Writer
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL