Skip to content

Commit

Permalink
ci: install beautysh
Browse files Browse the repository at this point in the history
  • Loading branch information
hougesen committed Mar 20, 2024
1 parent 9384b29 commit a441bbe
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 15 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -170,5 +170,8 @@ jobs:
- name: goimports
run: go install golang.org/x/tools/cmd/goimports@latest

- name: beautysh
run: pip install beautysh

- name: run tests
run: cargo test
18 changes: 4 additions & 14 deletions src/formatters/beautysh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,13 @@ mod test_beautysh {
#[test_with::executable(beautysh)]
#[test]
fn it_should_format_sh() {
let input = "
#!/bin/sh
let input = "#!/bin/shell
add () {
echo \"$1\" + \"$2\"
add() {
echo \"$1\" + \"$2\"
}
";
let expected_output = "#!/bin/sh
let expected_output = "#!/bin/shell
add() {
echo \"$1\" + \"$2\"
Expand Down
2 changes: 1 addition & 1 deletion src/languages/shell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ add() {
formatter: MdsfFormatter::Single(Shell::Beautysh),
};

let snippet = setup_snippet(INPUT, EXTENSION).expect("it to save the file");
let snippet = setup_snippet(input, EXTENSION).expect("it to save the file");
let snippet_path = snippet.path();

let output = l
Expand Down

0 comments on commit a441bbe

Please sign in to comment.