summaryrefslogtreecommitdiff
path: root/echo.md
blob: fef520e43bce74537b6b16da299b17f92e044aec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
---
title: "**echo**(1) acceptance tests"
author: Lars Wirzenius / The Fable project
...

Introduction
=============================================================================

**echo**(1) is a Unix command line tool, which writes its command line
arguments to the standard output. This is a simple acceptance test
suite for the `/bin/echo` implementation.

No arguments
=============================================================================

This scenario runs `/bin/echo` without arguments and checks that it
outputs a single newline character to the standard output, nothing to
the standard error, and exits with a zero exit code.

```fable
when user runs echo without arguments
then exit code is 0
and standard output contains a newline
and standard error is empty
```

Hello, world
=============================================================================

This scenario runs `/bin/echo` to produce the output "hello, world".

```fable
when user runs echo with arguments hello, world
then exit code is 0
and standard output contains "hello, world"
and standard error is empty
```