Skip to content

Latest commit

 

History

History
97 lines (57 loc) · 2.75 KB

clipboard.md

File metadata and controls

97 lines (57 loc) · 2.75 KB

Clipboard

Verify makes use of the clipboard.

This is done via the TextCopy project.

Accept received

When a verification fails, a command to accept the received version is added to the clipboard:

On Windows:

cmd /c move /Y "ReceivedFile" "VerifiedFile"

On Linux or OS:

mv -f "ReceivedFile" "VerifiedFile"

Cleanup dangling converter files

When a the number of files outputted from a converter reduces, a command to delete the extra files is added to the clipboard:

On Windows:

cmd /c del "VerifiedFile"

On Linux or OS:

rm -f "VerifiedFile"

Custom Command

A custom command can be used by adding environment variables.

Accept

Add a variable named Verify.MoveCommand where {0} and {1} will be replaced with the received and verified files respectively.

Cleanup

Add a variable named Verify.DeleteCommand where {0} will be replaced with the file to be cleaned up.

Disable Clipboard

The clipboard behavior can be disable using the following:

Per Test

var settings = new VerifySettings();
settings.DisableClipboard();

snippet source | anchor

For all tests

SharedVerifySettings.DisableClipboard();

snippet source | anchor

If clipboard is disabled for all tests, it can be re-enabled at the test level:

var settings = new VerifySettings();
settings.EnableClipboard();

snippet source | anchor

For a machine

Set a Verify.DisableClipboard environment variable to true. This overrides the above settings.