Created
March 30, 2012 23:23
-
-
Save manpages/2257850 to your computer and use it in GitHub Desktop.
Yet Another Erlang/Unicode Fuckup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(reduced_test_case). | |
-define(NODEBUG, 1). | |
-include_lib("eunit/include/eunit.hrl"). | |
-behavior(gen_server). | |
%-compile(export_all). | |
-export([init/1, code_change/3, handle_call/3, handle_cast/2, handle_info/2, terminate/2]). | |
-export([start/0]). | |
-define(SERVER, ?MODULE). | |
start() -> | |
{ok, PID} = gen_server:start_link({local, ?SERVER}, ?MODULE, [], []), | |
PID ! {hi, [1040,1044]}, | |
{ok, PID}. | |
handle_call(_Msg, _Caller, State) -> {noreply, State}. | |
handle_info({hi, Data}, State) -> io:format("~ts~n", [Data]), {noreply, State}; | |
handle_info(_Msg, State) -> {noreply, State}. | |
handle_cast(_Msg, State) -> {noreply, State}. | |
terminate(_Reason, _State) -> ok. | |
code_change(_OldVersion, State, _Extra) -> {ok, State}. | |
init(_) -> {ok, []}. | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "Reduced test case:" | |
cat reduced_test_case.erl | |
erlc reduced_test_case.erl | |
echo | |
echo "===" | |
echo "Running erl -eval \"reduced_test_case:start()\" with keys" | |
echo "* -run init stop" | |
echo | |
echo "<output>" | |
erl -eval "reduced_test_case:start()" -run init stop | |
echo "</output>" | |
echo | |
echo | |
echo "===" | |
echo "Running erl -eval \"reduced_test_case:start()\" with keys" | |
echo "* -run init stop -noshell" | |
echo | |
echo "<output>" | |
erl -eval "reduced_test_case:start()" -run init stop -noshell | |
echo "</output>" | |
echo | |
echo | |
echo | |
echo "Feel the difference." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment