Skip to content
This repository has been archived by the owner on Oct 20, 2021. It is now read-only.

Commit

Permalink
test: renderDebsecanDb
Browse files Browse the repository at this point in the history
Co-authored-by: pancho horrillo <[email protected]>
  • Loading branch information
nilp0inter and panchoh committed Apr 29, 2020
1 parent 6aa3c52 commit 3f64199
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Text/DebianSecurityAnalyzer/Database.hs
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ renderPackage r o p CVE { affected = aps
flags = [ 'S', getFlagUrgency pri, getFlagIsRemote rmt, getFlagIsFixAvailable r p aps ]
unstable_version = fromMaybe "" $ getUnstableVersion p aps
other_versions = unwords $ getOtherVersions p aps

renderDebsecanDb :: [CVE] -> String
renderDebsecanDb _ = undefined
4 changes: 4 additions & 0 deletions test/Text/DebianSecurityAnalyzer/DatabaseSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -197,3 +197,7 @@ spec = do
in renderPackage r 0 "package" cve
`shouldSatisfy`
\res -> maybe False (isPrefixOf "package,0,S F") res
describe "DATABASE FORMAT" $ do
describe "renderDebsecanDb: renders according to Debsecan's db format" $ do
it "should respect format (when empty)" $ do
renderDebsecanDb [] `shouldBe` "VERSION1\n\n\n"

0 comments on commit 3f64199

Please sign in to comment.