summaryrefslogtreecommitdiff
path: root/tests/subplots/common/runcmd_test.rs
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2022-10-22 11:59:50 +0000
committerLars Wirzenius <liw@liw.fi>2022-10-22 11:59:50 +0000
commit1bcbb535490511e0bc4f2826356a16bdd05360b0 (patch)
tree1e26b5616d61e9fc917278012f75d707bbfd97fa /tests/subplots/common/runcmd_test.rs
parent990c506d347a6aa09af68bc6de670858cf59f133 (diff)
parent7f52ffc37e1a366f78ba3709f15b09ca22ca98c9 (diff)
downloadsubplot-1bcbb535490511e0bc4f2826356a16bdd05360b0.tar.gz
Merge branch 'filepath-as-path' into 'main'
(derive): Support steps with &Path arguments Closes #288 See merge request subplot/subplot!295
Diffstat (limited to 'tests/subplots/common/runcmd_test.rs')
-rw-r--r--tests/subplots/common/runcmd_test.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/subplots/common/runcmd_test.rs b/tests/subplots/common/runcmd_test.rs
index 7759e5f..d3a7ca5 100644
--- a/tests/subplots/common/runcmd_test.rs
+++ b/tests/subplots/common/runcmd_test.rs
@@ -1,3 +1,4 @@
+use std::path::Path;
use subplotlib::steplibrary::files::{self, Datadir};
use subplotlib::steplibrary::runcmd::Runcmd;
@@ -8,7 +9,7 @@ use std::os::unix::fs::PermissionsExt;
#[context(Datadir)]
fn create_script_from_embedded(
context: &ScenarioContext,
- filename: &str,
+ filename: &Path,
embedded: SubplotDataFile,
) {
files::create_from_embedded_with_other_name::call(context, filename, embedded)?;
@@ -20,6 +21,6 @@ fn create_script_from_embedded(
}
#[step]
-fn prepend_to_path(context: &mut Runcmd, dirname: &str) {
+fn prepend_to_path(context: &mut Runcmd, dirname: &Path) {
context.prepend_to_path(dirname);
}