Skip to content

Commit b9dfec4

Browse files
committed
test: fixes the test case for -d on linux
1 parent c8fbc10 commit b9dfec4

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,20 @@
1212

1313
[![Build Status](https://github.com/kaelzhang/shell-safe-rm/actions/workflows/nodejs.yml/badge.svg)](https://github.com/kaelzhang/shell-safe-rm/actions/workflows/nodejs.yml)
1414

15-
A much safer replacement of bash `rm` with **ALMOST FULL** features of the origin `rm` command.
15+
[Safe-rm][safe-rm], a much safer replacement of [`rm`][rm] with **ALMOST FULL** features of the origin [`rm`][rm] command.
1616

1717
The project was initially developed for Mac OS X, and then tested on Linux.
1818

1919
## Features
2020
- Supports both MacOS and Linux with full test coverage.
2121
- Using `safe-rm`, the files or directories you choose to remove will be moved to the system Trash instead of simply deleting them. You could put them back whenever you want manually.
2222
- On MacOS, `safe-rm` will use [AppleScript][applescript] to delete files or directories as much as possible to enable the built-in "put-back" capability in the system Trash bin.
23-
- On Linux, t also follows the operating system's conventions for handling duplicate files in the Trash to avoid overwriting
23+
- On Linux, it also follows the operating system's conventions for handling duplicate files in the Trash to avoid overwriting
2424
- Supports Custom [configurations](#configuration).
2525

2626
## Supported options
2727

28-
For those implemented options, safe-rm will act **exactly the same** as the original `rm` command
28+
For those implemented options, safe-rm will act **exactly the same** as the original `rm` command:
2929

3030
| Option | Brief | Description |
3131
| ------ | ----- | ------------ |
@@ -136,3 +136,5 @@ alias="SAFE_RM_CONF=/path/to/safe-rm.conf safe-rm"
136136

137137

138138
[applescript]: https://en.wikipedia.org/wiki/AppleScript
139+
[rm]: https://en.wikipedia.org/wiki/Rm_(Unix)
140+
[safe-rm]: https://github.com/kaelzhang/shell-safe-rm

test/cases.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,10 +220,8 @@ module.exports = (
220220
const dirpath = await createDir()
221221
const result1 = await runRm([dirpath])
222222

223-
log('rm a dir without -d', result1)
224-
225223
t.is(result1.code, 1, 'exit code should be 1')
226-
t.true(result1.stderr.includes('is a directory'), 'stderr should include "is a directory"')
224+
t.true(result1.stderr.includes('a directory'), 'stderr should include "a directory"')
227225

228226
const result2 = await runRm(['-d', dirpath])
229227

0 commit comments

Comments
 (0)