1
1
mirror of https://github.com/casey/just.git synced 2024-11-21 14:52:13 +03:00
This commit is contained in:
Sibi Prabakaran 2024-11-21 09:03:00 +05:30 committed by GitHub
commit 6c66f35c4e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 1059 additions and 937 deletions

View File

@ -182,6 +182,7 @@ impl<'run, 'src> Analyzer<'run, 'src> {
unstable_features.insert(UnstableFeature::ScriptInterpreterSetting);
}
let source = root.canonicalize().unwrap();
let root = paths.get(root).unwrap();
Ok(Justfile {
@ -205,7 +206,7 @@ impl<'run, 'src> Analyzer<'run, 'src> {
name,
recipes,
settings,
source: root.into(),
source,
unexports: self.unexports,
unstable_features,
warnings: self.warnings,

View File

@ -23,7 +23,6 @@ pub(crate) struct Justfile<'src> {
pub(crate) name: Option<Name<'src>>,
pub(crate) recipes: Table<'src, Rc<Recipe<'src>>>,
pub(crate) settings: Settings<'src>,
#[serde(skip)]
pub(crate) source: PathBuf,
pub(crate) unexports: HashSet<String>,
#[serde(skip)]

File diff suppressed because it is too large Load Diff

View File

@ -167,6 +167,11 @@ impl Test {
self
}
pub(crate) fn stdout_with_tempdir(mut self, stdout_fn: impl Fn(&TempDir) -> String) -> Self {
self.stdout = stdout_fn(&self.tempdir);
self
}
pub(crate) fn stdout_regex(mut self, stdout_regex: impl AsRef<str>) -> Self {
self.stdout_regex = Some(Regex::new(&format!("^{}$", stdout_regex.as_ref())).unwrap());
self