42 lines · plain
1! Checks that the module file:2! * is _saved_3! * is saved in the _directory specified by the user_4! We use `-fsyntax-only` as it stops after the semantic checks (the module file is generated when sema checks are run)5 6!--------------------------7! -module-dir <value>8!--------------------------9! RUN: rm -rf %t && mkdir -p %t/dir-flang10! RUN: cd %t && %flang -fsyntax-only -module-dir %t/dir-flang %s11! RUN: ls %t/dir-flang/testmodule.mod && not ls %t/testmodule.mod12! RUN: cd -13 14!--------------------------15! -module-dir<value>16!--------------------------17! RUN: rm -rf %t && mkdir -p %t/dir-flang18! RUN: cd %t && %flang -fsyntax-only -module-dir%t/dir-flang %s19! RUN: ls %t/dir-flang/testmodule.mod && not ls %t/testmodule.mod20! RUN: cd -21 22!---------------------------23! -J <value>24!---------------------------25! RUN: rm -rf %t && mkdir -p %t/dir-flang26! RUN: cd %t && %flang -fsyntax-only -J %t/dir-flang %s27! RUN: ls %t/dir-flang/testmodule.mod && not ls %t/testmodule.mod28! RUN: cd -29 30!------------------------------31! -J<value>32!------------------------------33! RUN: rm -rf %t && mkdir -p %t/dir-flang34! RUN: cd %t && %flang -fsyntax-only -J%t/dir-flang %s35! RUN: ls %t/dir-flang/testmodule.mod && not ls %t/testmodule.mod36! RUN: cd -37 38module testmodule39 type::t240 end type41end42