aboutsummaryrefslogtreecommitdiff
path: root/helix-term/tests
diff options
context:
space:
mode:
authorBjorn Ove Hay Andersen2023-10-18 08:45:05 +0000
committerGitHub2023-10-18 08:45:05 +0000
commite6d2835b0907102831a8979688a8464c064ff842 (patch)
tree0fe84faa8dd583f318596a593f4c286c9a4b7222 /helix-term/tests
parentfc16449efe58a49c15e19c9fde6584d8625493fd (diff)
Fixed issue when the first file specified as an argument was a relative directory (#8520)
Diffstat (limited to 'helix-term/tests')
-rw-r--r--helix-term/tests/test/helpers.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/helix-term/tests/test/helpers.rs b/helix-term/tests/test/helpers.rs
index e6762baf..112b5e35 100644
--- a/helix-term/tests/test/helpers.rs
+++ b/helix-term/tests/test/helpers.rs
@@ -320,6 +320,14 @@ impl AppBuilder {
}
pub fn build(self) -> anyhow::Result<Application> {
+ if let Some(path) = &self.args.working_directory {
+ bail!("Changing the working directory to {path:?} is not yet supported for integration tests");
+ }
+
+ if let Some((path, _)) = self.args.files.first().filter(|p| p.0.is_dir()) {
+ bail!("Having the directory {path:?} in args.files[0] is not yet supported for integration tests");
+ }
+
let mut app = Application::new(self.args, self.config, self.syn_conf)?;
if let Some((text, selection)) = self.input {