summaryrefslogtreecommitdiff
path: root/lib/elixir/test/elixir/record_test.exs
diff options
context:
space:
mode:
authorWaldemar Rachwał <waldemar.rachwal@gmail.com>2015-02-11 16:50:35 +0100
committerWaldemar Rachwał <waldemar.rachwal@gmail.com>2015-02-11 16:50:35 +0100
commit048cf5f9f7e8e1b48eded0bab9276c1056f419f8 (patch)
tree3b1982d8a80cd0202ba43ed97ff449541c4e2001 /lib/elixir/test/elixir/record_test.exs
parentac314728917d75ac23830106d7524d36b8267353 (diff)
downloadelixir-048cf5f9f7e8e1b48eded0bab9276c1056f419f8.tar.gz
Add Record.extract_all/1 returning all records information
Diffstat (limited to 'lib/elixir/test/elixir/record_test.exs')
-rw-r--r--lib/elixir/test/elixir/record_test.exs7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/elixir/test/elixir/record_test.exs b/lib/elixir/test/elixir/record_test.exs
index 96460b1a9..0f15cdefe 100644
--- a/lib/elixir/test/elixir/record_test.exs
+++ b/lib/elixir/test/elixir/record_test.exs
@@ -28,6 +28,13 @@ defmodule RecordTest do
StructExtract.__struct__
end
+ test "extract_all/1 extracts all records information from an Erlang file" do
+ all_extract = Record.extract_all(from_lib: "kernel/include/file.hrl")
+ assert length(all_extract) == 2 # has been stable over the very long time
+ assert all_extract[:file_info]
+ assert all_extract[:file_descriptor]
+ end
+
# We need indirection to avoid warnings
defp record?(data, kind) do
Record.is_record(data, kind)