mirror of
https://jturnerusa.dev/cgit/gentoo-utils/
synced 2025-12-03 03:28:35 -06:00
remove depend test
The repo iteration test also tests depend parsers, so there is no need to have a dedicated depend parsing test now.
This commit is contained in:
@@ -1,28 +0,0 @@
|
||||
use gentoo_utils::{Parseable, atom::Atom, ebuild::Depend};
|
||||
use mon::{Parser, eof, input::InputIter, tag, whitespace1};
|
||||
use std::fs;
|
||||
|
||||
#[test]
|
||||
fn parse_md5_cache() {
|
||||
let md5_cache = "/var/db/repos/gentoo/metadata/md5-cache";
|
||||
|
||||
for cat in fs::read_dir(md5_cache).unwrap() {
|
||||
for pkg in fs::read_dir(cat.unwrap().path()).unwrap() {
|
||||
let metadata = fs::read_to_string(pkg.unwrap().path()).unwrap();
|
||||
|
||||
for line in metadata.lines() {
|
||||
if line.starts_with("DEPEND=") {
|
||||
eprintln!("{line}");
|
||||
eprintln!();
|
||||
Depend::<Atom>::parser()
|
||||
.separated_by(whitespace1(), 0..)
|
||||
.ignore()
|
||||
.or(eof())
|
||||
.preceded_by(tag("DEPEND="))
|
||||
.check_finished(InputIter::new(line))
|
||||
.unwrap();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user