Skip to content

Commit 720ae2b

Browse files
committed
✅tests(fortran): added.
1 parent e8bd2fe commit 720ae2b

2 files changed

Lines changed: 23 additions & 0 deletions

File tree

tests/tests.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ dofile(tests_dir .. 'cpp.lua')
1010
dofile(tests_dir .. 'cs.lua')
1111
dofile(tests_dir .. 'dart.lua')
1212
dofile(tests_dir .. 'elixir.lua')
13+
dofile(tests_dir .. 'fortran.lua')
1314
dofile(tests_dir .. 'fsharp.lua')
1415
dofile(tests_dir .. 'go.lua')
1516
dofile(tests_dir .. 'java.lua')
@@ -33,6 +34,7 @@ dofile(tests_dir .. 'zig.lua')
3334
-- * ruby → Run this file.
3435
-- * shell → Run this file.
3536
-- * elixir → Run this file.
37+
-- * fortran → Run this file.
3638
-- * fsharp → Run this file.
3739
-- * r → Run this file.
3840
-- * typescript → Run this file.

tests/tests/languages/fortran.lua

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
--- This test file run all supported cases of use.
2+
--- @usage :luafile ~/.local/share/nvim/lazy/compiler.nvim/tests/tests/languages/fortran.lua
3+
4+
local ms = 1000 -- wait time
5+
local language = require("compiler.languages.fortran")
6+
local example = vim.fn.stdpath "data" .. "/lazy/compiler.nvim/tests/examples/languages/fortran/"
7+
8+
-- Build and run
9+
vim.api.nvim_set_current_dir(example .. "fpm-build-and-run/")
10+
language.action("option2")
11+
vim.wait(ms)
12+
13+
-- Build
14+
vim.api.nvim_set_current_dir(example .. "fpm-build/")
15+
language.action("option3")
16+
vim.wait(ms)
17+
18+
-- Run
19+
vim.api.nvim_set_current_dir(example .. "fpm-run/")
20+
language.action("option4")
21+
vim.wait(ms)

0 commit comments

Comments
 (0)