mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-18 16:44:42 +04:00
Merge 3957ac8622 into 8416413a0e
This commit is contained in:
commit
74d5327dda
3 changed files with 28 additions and 2 deletions
|
|
@ -31,6 +31,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_with_startup(tmp_path):
|
||||
depot_path = tmp_path.joinpath('depot')
|
||||
depot_path.joinpath('config').mkdir(parents=True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue