Skip to content

Commit

Permalink
Change test script names
Browse files Browse the repository at this point in the history
  • Loading branch information
ryuichiueda committed Aug 22, 2024
1 parent dea06b1 commit 6e51108
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 12 deletions.
6 changes: 4 additions & 2 deletions src/error_message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@
use crate::ShellCore;

pub fn print(s: &str, core: &mut ShellCore, show_sush: bool) {
let name = core.data.get_param("0");

match (core.read_stdin, show_sush) {
(true, _) => {
let lineno = core.data.get_param("LINENO");
eprintln!("sush: line {}: {}", &lineno, s)
eprintln!("{}: line {}: {}", &name, &lineno, s)
},
(false, true) => eprintln!("sush: {}", &s),
(false, true) => eprintln!("{}: {}", &name, &s),
(false, false) => eprintln!("{}", &s),
}
}
Expand Down
2 changes: 2 additions & 0 deletions test/lineno.bash
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@

echo $0
echo $1

( eeeeee ; bbbbbb )
2 changes: 2 additions & 0 deletions test/lineno.sush
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@

echo $0
echo $1

( eeeeee ; bbbbbb )
6 changes: 3 additions & 3 deletions test/ok
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
./builtins.bash
./brace.bash
./job.bash
./test_builtins.bash
./test_brace.bash
./test_job.bash
4 changes: 0 additions & 4 deletions test/script.sush

This file was deleted.

6 changes: 3 additions & 3 deletions test/test.bash
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ com=../target/release/sush
: > error
: > ok

./job.bash nobuild &
./brace.bash nobuild &
./builtins.bash nobuild &
./test_job.bash nobuild &
./test_brace.bash nobuild &
./test_builtins.bash nobuild &

### SIMPLE COMMAND TEST ###

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 6e51108

Please sign in to comment.