Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: set executable required for all tests #277

Merged
merged 1 commit into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions mdsf.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
"swift": [["swift-format", "swiftformat"]],
"toml": "taplo",
"typescript": [["prettier", "biome", "deno_fmt"]],
"vue": "prettier",
"yaml": [["prettier", "yamlfmt", "yamlfix"]],
"zig": "zigfmt",
"vue": "prettier"
"zig": "zigfmt"
}
}
1 change: 0 additions & 1 deletion src/formatters/alejandra.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ mod test_alejandra {
use crate::{formatters::setup_snippet, generated::language_to_ext};

#[test_with::executable(alejandra)]
#[test]
fn it_should_format_nix() {
let input = r#"{
lib, buildPythonPackage, fetchFromGitHub, redis }:
Expand Down
1 change: 0 additions & 1 deletion src/formatters/autopep8.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ mod test_autopep8 {
use crate::{formatters::setup_snippet, generated::language_to_ext};

#[test_with::executable(autopep8)]
#[test]
fn it_should_format_python() {
let input = "def add( a: int , b:int)->int: return a+b";

Expand Down
2 changes: 0 additions & 2 deletions src/formatters/beautysh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ mod test_beautysh {
};

#[test_with::executable(beautysh)]
#[test]
fn it_should_format_sh() {
let input = "#!/bin/shell

Expand All @@ -47,7 +46,6 @@ add() {
}

#[test_with::executable(beautysh)]
#[test]
fn it_should_format_bash() {
let input = "#!/bin/bash

Expand Down
3 changes: 0 additions & 3 deletions src/formatters/biome.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ mod test_biome {
};

#[test_with::executable(npx)]
#[test]
fn it_should_format_json() {
let input = "
{
Expand Down Expand Up @@ -52,7 +51,6 @@ mod test_biome {
}

#[test_with::executable(npx)]
#[test]
fn it_should_format_javascript() {
let input = "
async function asyncAddition(
Expand Down Expand Up @@ -80,7 +78,6 @@ mod test_biome {
}

#[test_with::executable(npx)]
#[test]
fn it_should_format_typescript() {
let input = "
async function asyncAddition(
Expand Down
1 change: 0 additions & 1 deletion src/formatters/black.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ mod test_black {
use crate::{formatters::setup_snippet, generated::language_to_ext};

#[test_with::executable(black)]
#[test]
fn it_should_format_python() {
let input = "def add( a: int , b:int)->int: return a+b";

Expand Down
1 change: 0 additions & 1 deletion src/formatters/blue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ mod test_blue {
use crate::{formatters::setup_snippet, generated::language_to_ext};

#[test_with::executable(blue)]
#[test]
fn it_should_format_python() {
let input = "def add( a: int , b:int)->int: return a+b";

Expand Down
1 change: 0 additions & 1 deletion src/formatters/buf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ mod test_buf {
use crate::{formatters::setup_snippet, generated::language_to_ext};

#[test_with::executable(buf)]
#[test]
fn it_should_format_protobuf() {
let input = "service SearchService {
rpc Search (SearchRequest) returns (SearchResponse);
Expand Down
1 change: 0 additions & 1 deletion src/formatters/cabal_format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ mod test_cabal_format {
use crate::{formatters::setup_snippet, generated::language_to_ext};

#[test_with::executable(cabal)]
#[test]
fn it_should_format_cabal() {
let input = "cabal-version: 2.4
name: mdsf
Expand Down
8 changes: 0 additions & 8 deletions src/formatters/clang_format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ mod test_clang_format {
};

#[test_with::executable(clang-format)]
#[test]
fn it_should_format_c() {
let input = "int add(int a,int b){
a-b;
Expand All @@ -44,7 +43,6 @@ mod test_clang_format {
}

#[test_with::executable(clang-format)]
#[test]
fn it_should_format_cpp() {
let input = "int add(int a,int b){
a-b;
Expand All @@ -68,7 +66,6 @@ mod test_clang_format {
}

#[test_with::executable(clang-format)]
#[test]
fn it_should_format_csharp() {
let input = "namespace Mdsf {
class Adder {
Expand All @@ -94,7 +91,6 @@ mod test_clang_format {
}

#[test_with::executable(clang-format)]
#[test]
fn it_should_format_javascript() {
let input = " async function asyncAddition( a,b) {
a * b;
Expand All @@ -115,7 +111,6 @@ mod test_clang_format {
}

#[test_with::executable(clang-format)]
#[test]
fn it_should_format_json() {
let input = " {
\"key\": \"value\",
Expand Down Expand Up @@ -144,7 +139,6 @@ mod test_clang_format {
}

#[test_with::executable(clang-format)]
#[test]
fn it_should_format_objective_c() {
let input = "int add(int a,int b){
a - a ;
Expand All @@ -168,7 +162,6 @@ mod test_clang_format {
}

#[test_with::executable(clang-format)]
#[test]
fn it_should_format_protobuf() {
let input = "service SearchService {
rpc Search (SearchRequest) returns (SearchResponse);
Expand All @@ -189,7 +182,6 @@ mod test_clang_format {
}

#[test_with::executable(clang-format)]
#[test]
fn it_should_format_java() {
let input = "class HelloWorld {
public static void main(String[] args) {
Expand Down
1 change: 0 additions & 1 deletion src/formatters/cljstyle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ mod test_cljstyle {
use crate::{formatters::setup_snippet, generated::language_to_ext};

#[test_with::executable(cljstyle)]
#[test]
fn it_should_format_clojure() {
let input = "( ns
foo.bar.baz \"some doc\"
Expand Down
1 change: 0 additions & 1 deletion src/formatters/crystal_format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ mod test_crystal_format {
use crate::{formatters::setup_snippet, generated::language_to_ext};

#[test_with::executable(crystal)]
#[test]
fn it_should_format_crystal() {
let input = "def add(a, b) return a + b end";

Expand Down
1 change: 0 additions & 1 deletion src/formatters/csharpier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ mod test_csharpier {
use crate::{formatters::setup_snippet, generated::language_to_ext};

#[test_with::executable(dotnet)]
#[test]
fn it_should_format_csharp() {
let input = "namespace Mdsf {
class Adder {
Expand Down
1 change: 0 additions & 1 deletion src/formatters/dart_format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ mod test_dart_format {
use crate::{formatters::setup_snippet, generated::language_to_ext};

#[test_with::executable(dart)]
#[test]
fn it_should_format_dart() {
let input = "class Adder { int add(int a, int b) { return a + b; } } ";

Expand Down
3 changes: 0 additions & 3 deletions src/formatters/deno_fmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ mod test_deno_fmt {
use crate::{formatters::setup_snippet, generated::language_to_ext};

#[test_with::executable(deno)]
#[test]
fn it_should_format_json() {
let input = "
{
Expand Down Expand Up @@ -56,7 +55,6 @@ mod test_deno_fmt {
}

#[test_with::executable(deno)]
#[test]
fn it_should_format_javascript() {
let input = "
async function asyncAddition(a,b){
Expand All @@ -82,7 +80,6 @@ mod test_deno_fmt {
}

#[test_with::executable(deno)]
#[test]
fn it_should_format_typescript() {
let input = "
async function asyncAddition( a: \tnumber,b:number ) :Promise< number>
Expand Down
1 change: 0 additions & 1 deletion src/formatters/efmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ mod test_efmt {
};

#[test_with::executable(efmt)]
#[test]
fn it_should_format_erlang() {
let input = "what_is(Erlang) ->
case Erlang of movie->[hello(mike,joe,robert),credits]; language->formatting_arguments end
Expand Down
1 change: 0 additions & 1 deletion src/formatters/erlfmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ mod test_erlfmt {
};

#[test_with::executable(erlfmt)]
#[test]
fn it_should_format_erlang() {
let input = "what_is(Erlang) ->
case Erlang of movie->[hello(mike,joe,robert),credits]; language->formatting_arguments end
Expand Down
1 change: 0 additions & 1 deletion src/formatters/fantomas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ mod test_fantomas {
};

#[test_with::executable(fantomas)]
#[test]
fn it_should_format_ocaml() {
let input = "
let add a b = a + b
Expand Down
1 change: 0 additions & 1 deletion src/formatters/fourmolu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ mod test_fourmolu {
use crate::{formatters::setup_snippet, generated::language_to_ext};

#[test_with::executable(fourmolu)]
#[test]
fn it_should_format_haskell() {
let input = "
addNumbers::Int->Int->Int
Expand Down
1 change: 0 additions & 1 deletion src/formatters/fprettify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ mod test_fprettify {
use crate::{formatters::setup_snippet, generated::language_to_ext};

#[test_with::executable(fprettify)]
#[test]
fn it_should_format_fortran() {
let input = "program demo
integer :: endif,if,elseif
Expand Down
1 change: 0 additions & 1 deletion src/formatters/gleam_format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ mod test_gleam_format {
};

#[test_with::executable(gleam)]
#[test]
fn it_should_format_gleam() {
let input = "pub fn add(a:Int,b:Int)->Int{a+b}";
let expected_output = "pub fn add(a: Int, b: Int) -> Int {
Expand Down
1 change: 0 additions & 1 deletion src/formatters/gofmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ mod test_gofmt {
};

#[test_with::executable(gofmt)]
#[test]
fn it_should_format_go() {
let input = "package main

Expand Down
1 change: 0 additions & 1 deletion src/formatters/gofumpt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ mod test_gofumpt {
use crate::{formatters::setup_snippet, generated::language_to_ext};

#[test_with::executable(gofumpt)]
#[test]
fn it_should_format_go() {
let input = "package main

Expand Down
1 change: 0 additions & 1 deletion src/formatters/goimports.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ mod test_goimports {
use crate::{formatters::setup_snippet, generated::language_to_ext};

#[test_with::executable(goimports)]
#[test]
fn it_should_format_go() {
let input = "package main

Expand Down
1 change: 0 additions & 1 deletion src/formatters/golines.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ mod test_golines {
use crate::{formatters::setup_snippet, generated::language_to_ext};

#[test_with::executable(golines)]
#[test]
fn it_should_format_go() {
let input = "package main

Expand Down
1 change: 0 additions & 1 deletion src/formatters/google_java_format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ mod test_google_java_format {
use crate::{formatters::setup_snippet, generated::language_to_ext};

#[test_with::executable(google-java-format)]
#[test]
fn it_should_format_java() {
let input = "class HelloWorld {
public static void main(String[] args) {
Expand Down
1 change: 0 additions & 1 deletion src/formatters/hindent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ mod test_hindent {
use crate::{formatters::setup_snippet, generated::language_to_ext};

#[test_with::executable(hindent)]
#[test]
fn it_should_format_haskell() {
let input = "
addNumbers::Int->Int->Int
Expand Down
1 change: 0 additions & 1 deletion src/formatters/isort.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ mod test_isort {
use crate::{formatters::setup_snippet, generated::language_to_ext};

#[test_with::executable(isort)]
#[test]
fn it_should_format_python() {
let input = "from q import d
import b
Expand Down
1 change: 0 additions & 1 deletion src/formatters/juliaformatter_jl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ mod test_juliaformatter_jl {
use crate::{formatters::setup_snippet, generated::language_to_ext};

#[test_with::executable(julia)]
#[test]
fn it_should_format_julia() {
let input = "function add( a:: Int32, b::Int32 )
c = a+ b
Expand Down
1 change: 0 additions & 1 deletion src/formatters/just_fmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ mod test_just_fmt {
};

#[test_with::executable(just)]
#[test]
fn it_should_format_just() {
let input = "build:
cargo build
Expand Down
1 change: 0 additions & 1 deletion src/formatters/kcl_fmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ mod test_kcl_fmt {
use crate::{formatters::setup_snippet, generated::language_to_ext};

#[test_with::executable(kcl)]
#[test]
fn it_should_format_kcl() {
let input = r#"apiVersion = "apps/v1"
kind = "Deployment"
Expand Down
1 change: 0 additions & 1 deletion src/formatters/ktfmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ mod test_ktfmt {
use crate::{formatters::setup_snippet, generated::language_to_ext};

#[test_with::executable(ktfmt)]
#[test]
fn it_should_format_kotlin() {
let input = " fun add(a:Int ,b:Int ):Int {
return a + b
Expand Down
1 change: 0 additions & 1 deletion src/formatters/ktlint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ mod test_ktlint {
use crate::{formatters::setup_snippet, generated::language_to_ext};

#[test_with::executable(ktlint)]
#[test]
fn it_should_format_kotlin() {
let input = " fun add(a:Int ,b:Int ):Int {
return a + b
Expand Down
1 change: 0 additions & 1 deletion src/formatters/luaformatter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ mod test_luaformatter {
};

#[test_with::executable(lua-format)]
#[test]
fn it_should_format_lua() {
let input = "

Expand Down
1 change: 0 additions & 1 deletion src/formatters/mix_format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ mod test_mix_format {
};

#[test_with::executable(mix)]
#[test]
fn it_should_format_elixir() {
let input = "
def add(a , b ) do a + b end
Expand Down
1 change: 0 additions & 1 deletion src/formatters/nimpretty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ mod test_nimpretty {
};

#[test_with::executable(nimpretty)]
#[test]
fn it_should_format_nim() {
let input = "proc add( a :int , b:int ) : int =
return a + b ";
Expand Down
1 change: 0 additions & 1 deletion src/formatters/nixfmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ mod test_nixfmt {
use crate::{formatters::setup_snippet, generated::language_to_ext};

#[test_with::executable(nixfmt)]
#[test]
fn it_should_format_nix() {
let input = r#"{ lib, buildPythonPackage, fetchFromGitHub, redis }:

Expand Down
Loading
Loading