mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-19 09:04:41 +04:00
Julia: support language_version
This commit is contained in:
parent
a1d7bed86f
commit
e7509272b3
3 changed files with 28 additions and 2 deletions
|
|
@ -28,6 +28,22 @@ def test_julia_hook(tmp_path):
|
|||
assert run_language(tmp_path, julia, 'src/main.jl') == expected
|
||||
|
||||
|
||||
def test_julia_hook_version(tmp_path):
|
||||
code = """
|
||||
using Example
|
||||
function main()
|
||||
println("Hello, Julia $(VERSION)!")
|
||||
end
|
||||
main()
|
||||
"""
|
||||
_make_hook(tmp_path, code)
|
||||
expected = (0, b'Hello, Julia 1.10.10!\n')
|
||||
assert run_language(
|
||||
tmp_path, julia, 'src/main.jl',
|
||||
version='1.10.10',
|
||||
) == expected
|
||||
|
||||
|
||||
def test_julia_hook_manifest(tmp_path):
|
||||
code = """
|
||||
using Example
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue