Skip to content

Commit

Permalink
✅tests(fortran): added.
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeioth committed May 26, 2024
1 parent e8bd2fe commit 720ae2b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/tests.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ dofile(tests_dir .. 'cpp.lua')
dofile(tests_dir .. 'cs.lua')
dofile(tests_dir .. 'dart.lua')
dofile(tests_dir .. 'elixir.lua')
dofile(tests_dir .. 'fortran.lua')
dofile(tests_dir .. 'fsharp.lua')
dofile(tests_dir .. 'go.lua')
dofile(tests_dir .. 'java.lua')
Expand All @@ -33,6 +34,7 @@ dofile(tests_dir .. 'zig.lua')
-- * ruby → Run this file.
-- * shell → Run this file.
-- * elixir → Run this file.
-- * fortran → Run this file.
-- * fsharp → Run this file.
-- * r → Run this file.
-- * typescript → Run this file.
Expand Down
21 changes: 21 additions & 0 deletions tests/tests/languages/fortran.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
--- This test file run all supported cases of use.
--- @usage :luafile ~/.local/share/nvim/lazy/compiler.nvim/tests/tests/languages/fortran.lua

local ms = 1000 -- wait time
local language = require("compiler.languages.fortran")
local example = vim.fn.stdpath "data" .. "/lazy/compiler.nvim/tests/examples/languages/fortran/"

-- Build and run
vim.api.nvim_set_current_dir(example .. "fpm-build-and-run/")
language.action("option2")
vim.wait(ms)

-- Build
vim.api.nvim_set_current_dir(example .. "fpm-build/")
language.action("option3")
vim.wait(ms)

-- Run
vim.api.nvim_set_current_dir(example .. "fpm-run/")
language.action("option4")
vim.wait(ms)

0 comments on commit 720ae2b

Please sign in to comment.