mirror of
https://gitea.invidious.io/iv-org/shard-ameba.git
synced 2024-08-15 00:53:29 +00:00
Exclude globs as arguments
Examples: $ ameba path/to/shard/*.cr !path/to/shard/lib $ ameba . !lib
This commit is contained in:
parent
5aa7ee4854
commit
3c5e3cdef4
9 changed files with 125 additions and 32 deletions
|
@ -114,9 +114,9 @@ module Ameba::Cli
|
|||
end
|
||||
end
|
||||
|
||||
it "accepts unknown args as files" do
|
||||
it "accepts unknown args as globs" do
|
||||
c = Cli.parse_args %w(source1.cr source2.cr)
|
||||
c.files.should eq %w(source1.cr source2.cr)
|
||||
c.globs.should eq %w(source1.cr source2.cr)
|
||||
end
|
||||
|
||||
it "accepts one unknown arg as explain location if it has correct format" do
|
||||
|
@ -132,7 +132,7 @@ module Ameba::Cli
|
|||
it "allows args to be blank" do
|
||||
c = Cli.parse_args [] of String
|
||||
c.formatter.should be_nil
|
||||
c.files.should be_nil
|
||||
c.globs.should be_nil
|
||||
c.only.should be_nil
|
||||
c.except.should be_nil
|
||||
c.config.should eq Config::PATH
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue