@@ -102,8 +102,8 @@ spec = do
102
102
Success _ us -> do
103
103
length us `shouldBe` 3
104
104
NE. sort (NE. map licenseUnitName us) `shouldBe` NE. fromList [" No_license_found" , " apache-2.0" , " mit" ]
105
- NE. sort (licenseUnitFiles mitUnit) `shouldBe` NE. fromList [" vendor/foo/ bar/ MIT_LICENSE" , " vendor/foo/ bar/ baz/ SOMETHING_LICENSE" , " vendor/foo/ bar/ baz/quux/QUUX_LICENSE" ]
106
- NE. sort (licenseUnitFiles apacheUnit) `shouldBe` NE. fromList [" vendor/foo/ bar/ bar_apache.rb" , " vendor/foo/ bar/baz/something.rb" ]
105
+ NE. sort (licenseUnitFiles mitUnit) `shouldBe` NE. fromList [" vendor/foo.tar.gz/foo/ bar.tar.gz/bar/ MIT_LICENSE" , " vendor/foo.tar.gz/foo/ bar.tar.gz/bar/ baz.tar.gz/baz/ SOMETHING_LICENSE" , " vendor/foo.tar.gz/foo/ bar.tar.gz/bar/ baz.tar.gz/baz/quux.tar.gz /quux/QUUX_LICENSE" ]
106
+ NE. sort (licenseUnitFiles apacheUnit) `shouldBe` NE. fromList [" vendor/foo.tar.gz/foo/ bar.tar.gz/bar/ bar_apache.rb" , " vendor/foo.tar.gz/foo/ bar.tar.gz/bar/baz.tar.gz /baz/something.rb" ]
107
107
-- matchData should exist
108
108
let matchData = concatMap NE. toList $ NE. toList (fromMaybe (NE. fromList [] ) . licenseUnitDataMatchData <$> licenseUnitData mitUnit)
109
109
licenseUnitMatchDataMatchString <$> matchData `shouldBe` [Just mitLicense, Just mitLicense, Just mitLicense]
@@ -125,8 +125,8 @@ spec = do
125
125
Success _ us -> do
126
126
length us `shouldBe` 3
127
127
NE. sort (NE. map licenseUnitName us) `shouldBe` NE. fromList [" No_license_found" , " apache-2.0" , " mit" ]
128
- NE. sort (licenseUnitFiles mitUnit) `shouldBe` NE. fromList [" vendor/foo/ bar/ MIT_LICENSE" , " vendor/foo/ bar/ baz/ SOMETHING_LICENSE" , " vendor/foo/ bar/ baz/quux/QUUX_LICENSE" ]
129
- NE. sort (licenseUnitFiles apacheUnit) `shouldBe` NE. fromList [" vendor/foo/ bar/ bar_apache.rb" , " vendor/foo/ bar/baz/something.rb" ]
128
+ NE. sort (licenseUnitFiles mitUnit) `shouldBe` NE. fromList [" vendor/foo.tar.gz/foo/ bar.tar.gz/bar/ MIT_LICENSE" , " vendor/foo.tar.gz/foo/ bar.tar.gz/bar/ baz.tar.gz/baz/ SOMETHING_LICENSE" , " vendor/foo.tar.gz/foo/ bar.tar.gz/bar/ baz.tar.gz/baz/quux.tar.gz /quux/QUUX_LICENSE" ]
129
+ NE. sort (licenseUnitFiles apacheUnit) `shouldBe` NE. fromList [" vendor/foo.tar.gz/foo/ bar.tar.gz/bar/ bar_apache.rb" , " vendor/foo.tar.gz/foo/ bar.tar.gz/bar/baz.tar.gz /baz/something.rb" ]
130
130
-- We should get Contents since we're running themis with --srclib-with-full-files
131
131
licenseUnitDataContents <$> licenseUnitData mitUnit `shouldBe` NE. fromList [Just mitLicense, Just mitLicense, Just mitLicense]
132
132
-- matchData should be all Nothing
@@ -149,7 +149,7 @@ spec = do
149
149
Success _ us -> do
150
150
length us `shouldBe` 1
151
151
NE. sort (NE. map licenseUnitName us) `shouldBe` NE. fromList [" apache-2.0" ]
152
- NE. sort (licenseUnitFiles apacheUnit) `shouldBe` NE. fromList [" vendor/foo/ bar/ bar_apache.rb" , " vendor/foo/ bar/baz/something.rb" ]
152
+ NE. sort (licenseUnitFiles apacheUnit) `shouldBe` NE. fromList [" vendor/foo.tar.gz/foo/ bar.tar.gz/bar/ bar_apache.rb" , " vendor/foo.tar.gz/foo/ bar.tar.gz/bar/baz.tar.gz /baz/something.rb" ]
153
153
where
154
154
apacheUnit :: LicenseUnit
155
155
apacheUnit = fromMaybe emptyLicenseUnit (head' $ NE. filter (\ u -> licenseUnitName u == " apache-2.0" ) us)
0 commit comments