Files
Zygmunt Krynicki dab3d43ac1 tests: replace subset of "! foo" with "not foo"
This patch was automatically made with the following command

    find -name 'task.yaml' -exec sed -E -i -e 's/^( +)!([^|]+$)/\1not\2/g' {} \;

This looks for all files named "task.yaml" and replaces all occurrences
of "! something..." with "not something..." as long as pipes are not
used.

Pipes are more problematic because for correct semantics we need to
place the "not" command on the part that we actually expect to fail.

For example, consider the following three programs. The input and two
variations of the output program:

    ! echo foo bar | grep bar     # input program

    not echo foo bar | grep bar   # naive replacement

    echo foo bar | not grep bar   # correct replacement

A "!" applied to a pipe expression returns the negated exit code of the
pipe. A pipe expression alone returns the exit status of the last
element of the pipe, unless "set -o pipefail" is in effect, which we
disabled a while ago.

Therefore the correct replacement for pipe programs is to negate the
last component. The subsequent patch addresses this.

Signed-off-by: Zygmunt Krynicki <me@zygoon.pl>
2019-05-29 10:09:48 +02:00
..
2016-09-23 12:49:37 +02:00
2016-09-23 12:49:37 +02:00
2016-09-23 12:49:37 +02:00