mirror of
https://github.com/athityakumar/colorls.git
synced 2024-09-19 05:31:23 +02:00
test cases
This commit is contained in:
parent
597a8c6807
commit
07d456005d
3 changed files with 8 additions and 0 deletions
|
@ -103,6 +103,14 @@ RSpec.describe ColorLS::Flags do
|
|||
let(:args) { ['--long', FIXTURES] }
|
||||
|
||||
it('lists file info') { expect { subject }.to output(/((r|-).*(w|-).*(x|-).*){3}/).to_stdout }
|
||||
|
||||
it 'rounds up file size to nearest MiB' do
|
||||
expect { subject }.to output(/2 MiB[^\n]* 20kb-less-than-2mb\.txt/).to_stdout
|
||||
end
|
||||
|
||||
it 'rounds down file size to nearest MiB' do
|
||||
expect { subject }.to output(/1 MiB[^\n]* 20kb-more-than-1mb\.txt/).to_stdout
|
||||
end
|
||||
end
|
||||
|
||||
context 'with --long flag for `a.txt`' do
|
||||
|
|
BIN
spec/fixtures/20kb-less-than-2mb.txt
vendored
Normal file
BIN
spec/fixtures/20kb-less-than-2mb.txt
vendored
Normal file
Binary file not shown.
BIN
spec/fixtures/20kb-more-than-1mb.txt
vendored
Normal file
BIN
spec/fixtures/20kb-more-than-1mb.txt
vendored
Normal file
Binary file not shown.
Loading…
Reference in a new issue