File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -1507,7 +1507,7 @@ fn parse_quoted_word(pair: Pair<Rule>) -> Result<WordPart> {
15071507 parts. push ( WordPart :: Command ( command) ) ;
15081508 }
15091509 Rule :: VARIABLE => {
1510- parts. push ( WordPart :: Variable ( part. as_str ( ) [ 1 .. ] . to_string ( ) ) )
1510+ parts. push ( WordPart :: Variable ( part. as_str ( ) . to_string ( ) ) )
15111511 }
15121512 Rule :: QUOTED_CHAR => {
15131513 if let Some ( WordPart :: Text ( ref mut s) ) = parts. last_mut ( ) {
Original file line number Diff line number Diff line change @@ -74,6 +74,12 @@ async fn commands() {
7474 . run ( )
7575 . await ;
7676
77+ TestBuilder :: new ( )
78+ . command ( r#"FOO=1; echo "$FOO""# )
79+ . assert_stdout ( "1\n " )
80+ . run ( )
81+ . await ;
82+
7783 TestBuilder :: new ( )
7884 . command ( "echo 'a/b'/c" )
7985 . assert_stdout ( "a/b/c\n " )
You can’t perform that action at this time.
0 commit comments