-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from yhakbar/feature/adding_from
Adding `from`
- Loading branch information
Showing
8 changed files
with
184 additions
and
31 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 @@ | ||
run: echo "Hey, from the from directory!" |
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,2 @@ | ||
run: | ||
from: $GIT_ROOT/examples/from/.config/ya.yml |
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,2 @@ | ||
run: | ||
from: ../.config/ya.yml |
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
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,39 @@ | ||
#[cfg(test)] | ||
mod from { | ||
use anyhow::Result; | ||
use assert_cmd::Command; | ||
fn ya() -> Command { | ||
Command::cargo_bin(env!("CARGO_PKG_NAME")).expect("Error invoking ya") | ||
} | ||
|
||
#[test] | ||
fn from_noop() -> Result<()> { | ||
ya().args(["run"]) | ||
.current_dir("examples/from") | ||
.assert() | ||
.success() | ||
.stdout("Hey, from the from directory!\n"); | ||
|
||
Ok(()) | ||
} | ||
#[test] | ||
fn from_relative() -> Result<()> { | ||
ya().args(["run"]) | ||
.current_dir("examples/from/relative") | ||
.assert() | ||
.success() | ||
.stdout("Hey, from the from directory!\n"); | ||
|
||
Ok(()) | ||
} | ||
#[test] | ||
fn from_git() -> Result<()> { | ||
ya().args(["run"]) | ||
.current_dir("examples/from/git") | ||
.assert() | ||
.success() | ||
.stdout("Hey, from the from directory!\n"); | ||
|
||
Ok(()) | ||
} | ||
} |