Skip to content

Commit 2ccad7a

Browse files
committed
normalize man tests
1 parent f4e8ea6 commit 2ccad7a

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
download(1) Sample minimal application without commands download(1)
22

33
NAME
4-
download - Sample minimal application without commands
4+
download - Sample minimal application without commands
55

66
SYNOPSIS
7-
download SOURCE TARGET OPTIONS
7+
download SOURCE TARGET OPTIONS
88

99
DESCRIPTION
10-
Sample minimal application without commands
10+
Sample minimal application without commands
1111

1212
ARGUMENTS
13-
SOURCE
14-
URL to download from
13+
SOURCE
14+
URL to download from
1515

16-
• Required
16+
• Required
1717

18-
TARGET
19-
Target filename (default: same as source)
18+
TARGET
19+
Target filename (default: same as source)
2020

2121
OPTIONS
22-
--force, -f
23-
Overwrite existing files
22+
--force, -f
23+
Overwrite existing files
2424

2525
EXAMPLES
26-
download example.com
26+
download example.com
2727

28-
download example.com ./output -f
28+
download example.com ./output -f
2929

spec/bashly/libraries/render_mandoc_spec.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
.to match_approval('libraries/render/mandoc/render-1-download.md')
2929
.except(/\w{3,9} 202\d/, 'MONTH YEAR')
3030

31-
expect(`man "#{target}/download.1" | col -bx | sed '$d'`)
31+
# man output differs from system to system, so we normalize
32+
expect(`man "#{target}/download.1" | col -bx | sed '$d' | sed 's/^[[:space:]][[:space:]]*/ /'`)
3233
.to match_approval('libraries/render/mandoc/render-1-download.1')
3334
.diff(leeway)
3435
end

0 commit comments

Comments
 (0)