Hello, this is very possible and you have the right idea. You need to (provide ...) the functions from A.rkt in your case, and (require "A.rkt") in B.rkt. Then you can simply run "racket B.rkt" and the require will get all of the functions that have been provided in A.rkt (assuming these files are in the same directory).
If your students have many different functions in A.rkt that they would like to provide, you can use the shorthand (provide (all-defined-out)) in A.rkt to provide all of the definitions to B.rkt. More information is available here: https://docs.racket-lang.org/guide/module-basics.html. On Thursday, March 19, 2020 at 3:58:02 PM UTC-4, Alexandre Rademaker wrote: > > > Suppose I have some functions defined in a file A.rkt and some tests > defined in the file B.rkt. How can I execute the tests in the command line? > > I was expecting to be able to run > > > racket A.rkt B.rkt > > But this does not evaluate the expressions on B.rkt as I was expecting! > > 1. Do I need to export the functions in A.rkt with (provide …)? > 2. Do I need to add the (require …) in B.rkt? > > > The idea is to have the students submitting their A.rkt files and I could > test all of them using a single set of tests in another racket file. > > Ideas? What am I missing? > > Alexandre > > -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/252f5c19-0c1e-462f-a8a0-0f63e7e99e35%40googlegroups.com.