Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F33096151
install_version_test.exs
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
757 B
Referenced Files
None
Subscribers
None
install_version_test.exs
View Options
defmodule
InstallVersionTest
do
use
ExUnit.Case
,
async
:
true
describe
(
"install version check"
)
do
test
"README.md"
do
assert_version
(
"README.md"
)
end
end
defp
assert_version
(
filename
)
do
app
=
Keyword
.
get
(
Mix.Project
.
config
(),
:app
)
app_version
=
app
|>
Application
.
spec
(
:vsn
)
|>
to_string
()
file
=
File
.
read!
(
filename
)
[
_
,
file_versions
]
=
Regex
.
run
(
~r/{:
#{
app
}
, "(.+)"}/
,
file
)
assert
Version
.
match?
(
app_version
,
file_versions
),
"""
Install version constraint in `
#{
filename
}
` does not match to current app version.
Current App Version:
#{
app_version
}
`
#{
filename
}
` Install Versions:
#{
file_versions
}
"""
end
end
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Jan 20, 10:07 AM (1 d, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
969122
Default Alt Text
install_version_test.exs (757 B)
Attached To
Mode
R17 flake_id
Attached
Detach File
Event Timeline
Log In to Comment