-
Notifications
You must be signed in to change notification settings - Fork 346
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add additional tests for git scanning, and markdown format (#569)
Added additional tests and improves test coverage >80%. - Tests for git scanning - Tests for markdown format - Tests for rust building
- Loading branch information
1 parent
c509779
commit 4d86a90
Showing
22 changed files
with
165 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
target/ |
7 changes: 7 additions & 0 deletions
7
internal/sourceanalysis/fixtures-rust/rust-project/Cargo.lock
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
9 changes: 9 additions & 0 deletions
9
internal/sourceanalysis/fixtures-rust/rust-project/Cargo.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[package] | ||
name = "test-project" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
# smallvec = "=0.6.13" |
8 changes: 8 additions & 0 deletions
8
internal/sourceanalysis/fixtures-rust/rust-project/src/main.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
fn main() { | ||
println!("Hello, world!"); | ||
test_func(); | ||
} | ||
|
||
fn test_func() { | ||
println!("test func") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
test file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Example commit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ref: refs/heads/main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[core] | ||
repositoryformatversion = 0 | ||
filemode = true | ||
bare = false | ||
logallrefupdates = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Unnamed repository; edit this file 'description' to name the repository. |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# git ls-files --others --exclude-from=.git/info/exclude | ||
# Lines that start with '#' are comments. | ||
# For a project mostly in C, the following would be a good set of | ||
# exclude patterns (uncomment them if you want to use them): | ||
# *.[oa] | ||
# *~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0000000000000000000000000000000000000000 862ac4bd2703b622e85f29f55a2fd8cd6caf8182 Rex P <rexpan@google.com> 1696388400 +1100 commit (initial): Example commit |
1 change: 1 addition & 0 deletions
1
pkg/osvscanner/fixtures/example-git/git-hidden/logs/refs/heads/main
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0000000000000000000000000000000000000000 862ac4bd2703b622e85f29f55a2fd8cd6caf8182 Rex P <rexpan@google.com> 1696388400 +1100 commit (initial): Example commit |
Binary file added
BIN
+26 Bytes
...scanner/fixtures/example-git/git-hidden/objects/16/b14f5da9e2fcd6f3f38cc9e584cef2f3c90ebe
Binary file not shown.
Binary file added
BIN
+15 Bytes
...scanner/fixtures/example-git/git-hidden/objects/4b/825dc642cb6eb9a060e54bf8d69288fbee4904
Binary file not shown.
Binary file added
BIN
+644 Bytes
...scanner/fixtures/example-git/git-hidden/objects/86/2ac4bd2703b622e85f29f55a2fd8cd6caf8182
Binary file not shown.
Binary file added
BIN
+50 Bytes
...scanner/fixtures/example-git/git-hidden/objects/bf/8fbfe5a434c007b640c12d920683cb19a7b2b9
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
862ac4bd2703b622e85f29f55a2fd8cd6caf8182 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"queries": [ | ||
{ | ||
"commit": "862ac4bd2703b622e85f29f55a2fd8cd6caf8182", | ||
"package": {} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters