@@ -68,6 +68,7 @@ subroutine collect_manifest(tests)
68
68
& new_unittest(" example-empty" , test_example_empty, should_fail= .true. ), &
69
69
& new_unittest(" install-library" , test_install_library), &
70
70
& new_unittest(" install-empty" , test_install_empty), &
71
+ & new_unittest(" install-module-dir" , test_install_module_dir), &
71
72
& new_unittest(" install-wrongkey" , test_install_wrongkey, should_fail= .true. ), &
72
73
& new_unittest(" preprocess-empty" , test_preprocess_empty), &
73
74
& new_unittest(" preprocess-wrongkey" , test_preprocess_wrongkey, should_fail= .true. ), &
@@ -1359,6 +1360,34 @@ subroutine test_install_wrongkey(error)
1359
1360
1360
1361
end subroutine test_install_wrongkey
1361
1362
1363
+
1364
+ subroutine test_install_module_dir (error )
1365
+ use fpm_manifest_install
1366
+
1367
+ ! > Error handling
1368
+ type (error_t), allocatable , intent (out ) :: error
1369
+
1370
+ type (toml_table) :: table
1371
+ type (install_config_t) :: install
1372
+
1373
+ table = toml_table()
1374
+ call set_value(table, " module-dir" , " custom_modules" )
1375
+
1376
+ call new_install_config(install, table, error)
1377
+ if (allocated (error)) return
1378
+
1379
+ if (.not. allocated (install% module_dir)) then
1380
+ call test_failed(error, " Module directory should be allocated" )
1381
+ return
1382
+ end if
1383
+
1384
+ if (install% module_dir /= " custom_modules" ) then
1385
+ call test_failed(error, " Module directory should match input" )
1386
+ return
1387
+ end if
1388
+
1389
+ end subroutine test_install_module_dir
1390
+
1362
1391
subroutine test_preprocess_empty (error )
1363
1392
use fpm_manifest_preprocess
1364
1393
0 commit comments