Skip to content

Commit

Permalink
Add a minimal test to excite Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
paulo-ferraz-oliveira committed Jul 18, 2023
1 parent 6d54f62 commit e92f587
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/rebar3_checkshell_prv.erl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
-export([do/1]).
-ignore_xref([do/1]).

-export([do_for/2]).
-ignore_xref([do_for/2]).

-export([format_error/1]).
-ignore_xref([format_error/1]).

Expand Down
17 changes: 17 additions & 0 deletions test/rebar3_checkshell_SUITE.erl
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
-module(rebar3_checkshell_SUITE).

-define(REBAR3_NEW_STATE, rebar_state:new()).

-compile([export_all, nowarn_export_all]).

all() ->
[
Fun
|| {Fun, 1} <- ?MODULE:module_info(exports),
not lists:member(Fun, [module_info])
].

test(Config) ->
DataDir = proplists:get_value(data_dir, Config),
Empty = filename:join(DataDir, "empty.sh"),
{ok, _} = rebar3_checkshell_prv:do_for([Empty], ?REBAR3_NEW_STATE).
1 change: 1 addition & 0 deletions test/rebar3_checkshell_SUITE_data/empty.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#!/bin/bash

0 comments on commit e92f587

Please sign in to comment.