Cover the new --inode flag with tests

This commit is contained in:
goar5670 2022-03-20 02:31:01 +03:00
parent eb2656a219
commit c1469a4196
2 changed files with 9 additions and 0 deletions

View file

@ -371,6 +371,14 @@ RSpec.describe ColorLS::Flags do
end end
end end
context 'with --inode flag' do
let(:args) { ['--inode', '-i', 'show inode number', FIXTURES] }
it 'shows inode number' do
expect { subject }.to output(/\d{7,}/).to_stdout
end
end
context 'with non-existent path' do context 'with non-existent path' do
let(:args) { ['not_exist_file'] } let(:args) { ['not_exist_file'] }

View file

@ -37,6 +37,7 @@ OK colorls --tree=1
OK colorls --report OK colorls --report
OK colorls --report=long OK colorls --report=long
OK colorls --report=short OK colorls --report=short
OK colorls --inode
LC_ALL=C OK colorls spec/fixtures/ LC_ALL=C OK colorls spec/fixtures/
LC_ALL=C OK colorls --git spec/fixtures/ LC_ALL=C OK colorls --git spec/fixtures/