From 048cf5f9f7e8e1b48eded0bab9276c1056f419f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Waldemar=20Rachwa=C5=82?= Date: Wed, 11 Feb 2015 16:50:35 +0100 Subject: Add Record.extract_all/1 returning all records information --- lib/elixir/test/elixir/record_test.exs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/elixir/test') 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) -- cgit v1.2.1