File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,6 +34,8 @@ Temporary Items
3434# End of https://www.toptal.com/developers/gitignore/api/rust,macos
3535* .json
3636* .csv
37+ ! test_commands.csv
38+ ! tests /fixtures /* .csv
3739* .bundle
3840assets /zoom_iterm.scpt
3941assets /zoom_iterm.scpt
Original file line number Diff line number Diff line change @@ -229,8 +229,8 @@ mod tests {
229229
230230 #[ test]
231231 fn test_read_commands_from_csv_valid_csv ( ) {
232- let path = "tests/fixtures/ commands.csv" ; // Must be a real file with no prompts
233- let commands = read_commands_from_csv ( path ) . expect ( "Should parse CSV" ) ;
232+ let commands =
233+ read_commands_from_csv ( "tests/fixtures/commands.csv" ) . expect ( "Should parse CSV" ) ;
234234
235235 assert_eq ! ( commands. len( ) , 2 ) ;
236236 assert_eq ! ( commands[ 0 ] . display_name, "List Files" ) ;
@@ -239,15 +239,14 @@ mod tests {
239239
240240 #[ test]
241241 fn test_read_commands_from_invalid_csv ( ) {
242- let path = "tests/fixtures/invalid.csv" ; // Create this with garbage data
243- let result = read_commands_from_csv ( path) ;
242+ let result = read_commands_from_csv ( "tests/fixtures/invalid.csv" ) ;
244243 assert ! ( result. is_err( ) ) ;
245244 }
246245
247246 #[ test]
248247 fn test_read_commands_from_empty_csv ( ) {
249- let path = "tests/fixtures/empty.csv" ;
250- let commands = read_commands_from_csv ( path ) . expect ( "Should parse empty CSV" ) ;
248+ let commands =
249+ read_commands_from_csv ( "tests/fixtures/empty.csv" ) . expect ( "Should parse empty CSV" ) ;
251250 assert ! ( commands. is_empty( ) ) ;
252251 }
253252}
Original file line number Diff line number Diff line change 1+ display_name , command
2+ Test Command 1 , test_command_1
3+ Test Command 2 , test_command_2
Original file line number Diff line number Diff line change 1+ display_name , command
2+ List Files , ls -la
3+ Show Date , date
Original file line number Diff line number Diff line change 1+ display_name , command
Original file line number Diff line number Diff line change 1+ this , is , not , valid
2+ data , with , wrong , columns
3+ missing , header
You can’t perform that action at this time.
0 commit comments