summaryrefslogtreecommitdiff
path: root/spec/unit/core
diff options
context:
space:
mode:
authormo khan <mo.khan@gmail.com>2020-05-07 16:15:49 -0600
committermo khan <mo.khan@gmail.com>2020-05-07 16:15:49 -0600
commit99dc28a123b59d5052db3e20ec428c023091ee13 (patch)
tree3e5620a0a386372615ce74b44625f3897dd8b872 /spec/unit/core
parent12976945583edd10b798e2048edd9f6e59b58d5a (diff)
Parse spdx expressions to determine license
Diffstat (limited to 'spec/unit/core')
-rw-r--r--spec/unit/core/guess_spec.rb26
1 files changed, 13 insertions, 13 deletions
diff --git a/spec/unit/core/guess_spec.rb b/spec/unit/core/guess_spec.rb
index 9488cc9..f19aa18 100644
--- a/spec/unit/core/guess_spec.rb
+++ b/spec/unit/core/guess_spec.rb
@@ -44,20 +44,20 @@ RSpec.describe Spandx::Core::Guess do
specify { expect(subject.license_for(content)&.id).to eql('MIT') }
end
- pending { expect(subject.license_for('(0BSD OR MIT)')&.id).to eql('0BSD') }
- pending { expect(subject.license_for('(BSD-2-Clause OR MIT OR Apache-2.0)')&.id).to eql('BSD-2-Clause') }
- pending { expect(subject.license_for('(BSD-3-Clause OR GPL-2.0)')&.id).to eql('BSD-3-Clause') }
- pending { expect(subject.license_for('(MIT AND CC-BY-3.0)')&.id).to eql('(MIT AND CC-BY-3.0)') }
- pending { expect(subject.license_for('(MIT AND Zlib)')&.id).to eql(%w[MIT Zlib]) }
- pending { expect(subject.license_for('(MIT OR Apache-2.0)')&.id).to eql('MIT') }
- pending { expect(subject.license_for('(MIT OR CC0-1.0)')&.id).to eql('MIT') }
- pending { expect(subject.license_for('(MIT OR GPL-3.0)')&.id).to eql('MIT') }
- pending { expect(subject.license_for('(WTFPL OR MIT)')&.id).to eql('WTFPL') }
- pending { expect(subject.license_for('BSD-3-Clause OR MIT')&.id).to eql('BSD-3-Clause') }
- pending { expect(subject.license_for('BSD-like')&.id).to eql('MIT') }
- pending { expect(subject.license_for('MIT or GPLv3')&.id).to eql('MIT') }
- pending { expect(subject.license_for('MIT/X11')&.id).to eql('X11') }
+ specify { expect(subject.license_for('(0BSD OR MIT)')&.id).to eql('0BSD') }
+ specify { expect(subject.license_for('(BSD-2-Clause OR MIT OR Apache-2.0)')&.id).to eql('BSD-2-Clause') }
+ specify { expect(subject.license_for('(BSD-3-Clause OR GPL-2.0)')&.id).to eql('BSD-3-Clause') }
+ specify { expect(subject.license_for('(MIT AND CC-BY-3.0)')&.id).to eql('MIT') }
+ specify { expect(subject.license_for('(MIT AND Zlib)')&.id).to eql('MIT') }
+ specify { expect(subject.license_for('(MIT OR Apache-2.0)')&.id).to eql('MIT') }
+ specify { expect(subject.license_for('(MIT OR CC0-1.0)')&.id).to eql('MIT') }
+ specify { expect(subject.license_for('(MIT OR GPL-3.0)')&.id).to eql('MIT') }
+ specify { expect(subject.license_for('(WTFPL OR MIT)')&.id).to eql('WTFPL') }
specify { expect(subject.license_for('Apache 2.0')&.id).to eql('Apache-2.0') }
+ specify { expect(subject.license_for('BSD-3-Clause OR MIT')&.id).to eql('BSD-3-Clause') }
+ specify { expect(subject.license_for('BSD-like')&.id).to eql('Nonstandard') }
specify { expect(subject.license_for('Common Public License Version 1.0')&.id).to eql('CPL-1.0') }
+ specify { expect(subject.license_for('MIT or GPLv3')&.id).to eql('MIT') }
+ pending { expect(subject.license_for('MIT/X11')&.id).to eql('X11') }
end
end