defmodule Elixir::PartialApplicationTest do
  use ExUnit::Case

  def test_partial_with_simple_call_and_one_item do
    fun = minus(10, _)
    5 = fun.(5)
    7 = fun.(3)
  end

  def test_partial_with_simple_call_and_all_items do
    fun = minus(_, _)
    5 = fun.(10, 5)
    7 = fun.(13, 6)
  end

  def test_partial_with_atom_call_and_one_item do
    fun = :minus.(10, _)
    5 = fun.(5)
    7 = fun.(3)
  end

  def test_partial_with_funcall_and_one_item do
    fun = minus(_, _)
    fun = fun.(10, _)
    5 = fun.(5)
    7 = fun.(3)
  end

  def test_partial_with_funcall_and_all_items do
    fun = minus(_, _)
    fun = fun.(_, _)
    5 = fun.(10, 5)
    7 = fun.(13, 6)
  end

  defp minus(x, y) do
    x - y
  end
end
defmodule Elixir::PartialApplicationTest do
  use ExUnit::Case

  def test_partial_with_simple_call_and_one_item do
    fun = minus(10, _)
    5 = fun.(5)
    7 = fun.(3)
  end

  def test_partial_with_simple_call_and_all_items do
    fun = minus(_, _)
    5 = fun.(10, 5)
    7 = fun.(13, 6)
  end

  def test_partial_with_atom_call_and_one_item do
    fun = :minus.(10, _)
    5 = fun.(5)
    7 = fun.(3)
  end

  def test_partial_with_funcall_and_one_item do
    fun = minus(_, _)
    fun = fun.(10, _)
    5 = fun.(5)
    7 = fun.(3)
  end

  def test_partial_with_funcall_and_all_items do
    fun = minus(_, _)
    fun = fun.(_, _)
    5 = fun.(10, 5)
    7 = fun.(13, 6)
  end

  def test_partial_with_internal_macro do
    fun = if(_, do: 1, else: 2)
    1 = fun.(20)
    2 = fun.(nil)
  end

  defp minus(x, y) do
    x - y
  end
end
Add test for partially applying an internal macro.
Add test for partially applying an internal macro.

beedub/elixir,beedub/elixir,lexmag/elixir,joshprice/elixir,antipax/elixir,lexmag/elixir,gfvcastro/elixir,ggcampinho/elixir,elixir-lang/elixir,gfvcastro/elixir,kimshrier/elixir,kimshrier/elixir,kelvinst/elixir,pedrosnk/elixir,kelvinst/elixir,pedrosnk/elixir,ggcampinho/elixir,michalmuskala/elixir,antipax/elixir