pantry/projects/elixir-lang.org/package.yml
Jacob Heider c2da838584 fix(elixir)
closes #4568
2023-12-22 12:28:23 -05:00

40 lines
739 B
YAML

distributable:
url: https://github.com/elixir-lang/elixir/archive/refs/tags/v{{version}}.tar.gz
strip-components: 1
versions:
github: elixir-lang/elixir
strip: /v/
dependencies:
erlang.org: '*'
build: make install PREFIX="{{prefix}}"
provides:
- bin/elixir
- bin/elixirc
- bin/iex
- bin/mix
test:
script: |
elixir --version
mkdir test
cp $FIXTURE test/test.exs
cd test
elixir test.exs
fixture: |
whichfizz = fn
(0, 0, _) -> "FizzBuzz"
(0, _, _) -> "Fizz"
(_, 0, _) -> "Buzz"
(_, _, n) -> n
end
fizzbuzz = fn (n) ->
whichfizz.(rem(n, 3), rem(n, 5), n)
end
[1, 2, "Fizz", 4, "Buzz", "Fizz", 7, 8, "Fizz", "Buzz"] = Enum.map(1..10, fizzbuzz)