28 lines
468 B
Erlang
28 lines
468 B
Erlang
% testing utilities
|
|
-module(ts_utils).
|
|
|
|
-export([
|
|
ct_dir/0,
|
|
ct_file/1, ct_file_abspath/1
|
|
]).
|
|
|
|
|
|
-spec ct_dir() -> string().
|
|
|
|
% directory containing the tests for the tokenizer
|
|
ct_dir() ->
|
|
zx_daemon:get_home() ++ "/ct".
|
|
|
|
|
|
ct_file_abspath(Name) ->
|
|
ct_file(Name).
|
|
|
|
-spec ct_file(Name) -> AbsPath when
|
|
Name :: string(),
|
|
AbsPath :: string().
|
|
% @doc
|
|
% ct_file("foo.aes") -> "/path/to/ct/foo.aes"
|
|
|
|
ct_file(Name) ->
|
|
ct_dir() ++ "/" ++ Name.
|