File tree 3 files changed +10
-5
lines changed 3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 39
39
min_version :
40
40
name : Minimum supported rust version
41
41
runs-on : ubuntu-20.04
42
+ env :
43
+ MSRV_FEATURES : --no-default-features --features minimal-application,bugreport,build-assets
42
44
steps :
43
45
- name : Checkout source code
44
46
uses : actions/checkout@v2
@@ -54,12 +56,12 @@ jobs:
54
56
uses : actions-rs/cargo@v1
55
57
with :
56
58
command : clippy
57
- args : --locked --all-targets --all-features
59
+ args : --locked --all-targets ${{ env.MSRV_FEATURES }}
58
60
- name : Run tests
59
61
uses : actions-rs/cargo@v1
60
62
with :
61
63
command : test
62
- args : --locked
64
+ args : --locked ${{ env.MSRV_FEATURES }}
63
65
64
66
test_with_new_syntaxes_and_themes :
65
67
name : Run tests with updated syntaxes and themes
Original file line number Diff line number Diff line change @@ -987,6 +987,7 @@ fn header_full_binary() {
987
987
}
988
988
989
989
#[ test]
990
+ #[ cfg( feature = "git" ) ] // Expected output assumes git is enabled
990
991
fn header_default ( ) {
991
992
bat ( )
992
993
. arg ( "--paging=never" )
@@ -1011,6 +1012,7 @@ fn header_default() {
1011
1012
}
1012
1013
1013
1014
#[ test]
1015
+ #[ cfg( feature = "git" ) ] // Expected output assumes git is enabled
1014
1016
fn header_default_is_default ( ) {
1015
1017
bat ( )
1016
1018
. arg ( "--paging=never" )
@@ -1373,6 +1375,7 @@ fn plain_mode_does_not_add_nonexisting_newline() {
1373
1375
1374
1376
// Regression test for https://github.com/sharkdp/bat/issues/299
1375
1377
#[ test]
1378
+ #[ cfg( feature = "git" ) ] // Expected output assumes git is enabled
1376
1379
fn grid_for_file_without_newline ( ) {
1377
1380
bat ( )
1378
1381
. arg ( "--paging=never" )
Original file line number Diff line number Diff line change
1
+ #[ cfg( feature = "git" ) ]
1
2
mod tester;
2
3
3
- use crate :: tester:: BatTester ;
4
-
5
4
macro_rules! snapshot_tests {
6
5
( $( $test_name: ident: $style: expr, ) * ) => {
7
6
$(
8
7
#[ test]
8
+ #[ cfg( feature = "git" ) ]
9
9
fn $test_name( ) {
10
- let bat_tester = BatTester :: default ( ) ;
10
+ let bat_tester = tester :: BatTester :: default ( ) ;
11
11
bat_tester. test_snapshot( stringify!( $test_name) , $style) ;
12
12
}
13
13
) *
You can’t perform that action at this time.
0 commit comments