Skip to content

Latest commit

 

History

History
66 lines (52 loc) · 1.91 KB

code-testing.md

File metadata and controls

66 lines (52 loc) · 1.91 KB
title layout
Code Testing
default

General Testing

Using ninja test and meson test --setup=fake_media_root will cover most of rmw's operations. If there's a test missing, please open a ticket.

Environmental Variables

RMW_FAKE_HOME (v0.8.0)
(replaces RMWTEST_HOME, introduced in v0.7.03)

Instead of using $HOME, rmw will use $RMW_FAKE_HOME. The configuration file and default waste directory will be written relative to $RMW_FAKE_HOME.

RMW_FAKE_HOME=$PWD/footest

While set, using rmw to move any files that reside on the same file system as $PWD/footest will be moved to the waste directories under $PWD/footest and rmw will use the configuration file under $PWD/footest.

RMW_FAKE_YEAR (v0.7.07)
(replaces RMWTRASH=fake-year, introduced in v0.4.01)

If set to true when rmw'ing a file, the year 1999 will be written to the DeletionDate value in the .trashinfo file (for testing the purge feature).

RMW_FAKE_YEAR=true rmw FILE(s)

Then running rmw with the purge option will find the items expired and permanently delete them.

RMW_FAKE_MEDIA_ROOT (v0.7.07)(removed in v0.9.3)

If set to true when rmw-ing a file, relative paths will be written to the Path key of a .trashinfo file. rmw is faked into believing that all waste directories are at the top level of a device or removable medium (see also: issue 299).

RMW_FAKE_MEDIA_ROOT=true rmw FILE(s)