aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/test
AgeCommit message (Collapse)Author
2013-04-19Remove the "coding: utf-8" comment from all Erlang source filesHans Bolinder
2013-04-17Merge branch 'bjorn/fix-encoding/OTP-11041' into maintBjörn Gustavsson
* bjorn/fix-encoding/OTP-11041: Encode Erlang source files with non-ascii characters in UTF-8
2013-04-17Encode Erlang source files with non-ascii characters in UTF-8Björn Gustavsson
To ensure that 'master' compiles when we merge 'maint' to it, regardless of which encoding is default in 'master', all source files with non-ascii characters *must* have the encoding specified.
2013-04-15Merge branch 'jaf/fix-supervisor-multi-restart/OTP-11042' into maintFredrik Gustafsson
2013-04-11Merge branch 'sverk/dets_remove_test_otp_9607' into maintSverker Eriksson
* sverk/dets_remove_test_otp_9607: stdlib: Fix unstable testcase ets_SUITE:delete_large_named_table stdlib: Remove obsolete testcase dets_SUITE:otp_9607
2013-04-04Merge branch 'sv/stdlib/sys-get-state/OTP-11013' into maintFredrik Gustafsson
* sv/stdlib/sys-get-state/OTP-11013: Removed ?line macro add sys:get_state/1,2 and sys:replace_state/2,3 update sys:get_status/2,3 documentation for gen_event
2013-04-04Fix rest_for_one and one_for_all restarting a child not terminatedJames Fish
In rest_for_one and one_for_all supervisors one child dying can cause multiple children to be restarted. Previously if the child that caused the restart is started successfully but another child fails to start, the supervisor would not terminate this child with the other successfully restarted children as no record of the pid was kept. Thus the supervisor would try to start this child again. This could lead to multiples of the same child or if the child is registered cause repeated attempts at starting this child - until the max restart threshold was reached. Now the child that failed to start becomes the restarting child, instead of staying with the same child, for the next restart attempt. This has the following side effects: 1) In one_for_all the new version of the child that original died is terminated before a restart attempt is made. 2) In rest_for_one all succesfully restarted children are not terminated and restarting continues from the child that failed to start.
2013-04-04Changed handshake from to_erl to run_erl, on behalf of shell searchFredrik Gustafsson
2013-04-03Removed ?line macroFredrik Gustafsson
2013-04-02add sys:get_state/1,2 and sys:replace_state/2,3Steve Vinoski
At Erlang Factory 2013 there was discussion during one of the talks about the sys:get_status functions and how useful they were for debugging. Geoff Cant mentioned it would be very useful if the sys module also provided functions to use while debugging to get just the state of a process and also to be able to replace the state of a process, and many others in the audience appeared to agree. The sys:get_state/1,2 functions return the state of a gen_server, gen_fsm, or gen_event process. The return value varies depending on the process type: process state for a gen_server, state name and state data for a gen_fsm, and handler module, handler id, and handler state for each handler registered in a gen_event process. The sys:replace_state/2,3 functions allow the state of a gen_server, gen_fsm, or gen_event process to be replaced with a new state. These functions take a function argument that updates or replaces the process state; using a function to change the state eliminates the race condition of first reading the state via sys:get_state/1 or sys:get_state/2, using its return value to create a new state, and then replacing the old state with the new state, since during that time the process might have received other calls or messages that could have changed its state. * For a gen_server process, the state replacement function takes the process state as an argument and returns a new state. * For a gen_fsm process, the state replacement function gets a tuple of {StateName, StateData} and returns a similar tuple that specifies a new state name, new state data, or both. * For a gen_event process, the state replacement function is called for each registered event handler. It gets a tuple {Module, Id, HandlerState} and returns a similar tuple that specifies the same Module and Id values but may specify a different value for HandlerState. If the state replacement function crashes or results in an error, the original state of a gen_server or gen_fsm process is maintained; if such a crash occurs for a gen_event process, the original state of the event handler for which the state replacement function was called is maintained, but the states of other event handlers of the same gen_event process may still be updated if no errors or crashes occur while replacing their states. Add documentation for sys:get_state/1,2 and sys:replace_state/2,3. The documentation explicitly notes that the functions are intended for use during debugging. Add new tests for these functions to gen_server_SUITE, gen_fsm_SUITE, and gen_event_SUITE.
2013-03-29Document erl_parse:abstract/2Hans Bolinder
A bug has been fixed: when given the option {encoding,utf8} a list of floating point numbers (in the correct interval) was mistakenly returned as a string.
2013-03-28Fix a bug in the Erlang scannerHans Bolinder
The scanner did not crash when a floating point number was encountered in the input string.
2013-03-27stdlib: Fix unstable testcase ets_SUITE:delete_large_named_tableSverker Eriksson
Remove the call trace from this testcase as we cannot guarantee named table to be gone until ets:delete returns anyway.
2013-03-27stdlib: Remove obsolete testcase dets_SUITE:otp_9607Sverker Eriksson
2013-03-26Merge branch 'dgud/testcase_fixes' into maintDan Gudmundsson
* dgud/testcase_fixes: Fix timers mnesia: Decrease test times Add debug printouts wx: Fix failing testcases stdlib: Ignore symlink tests on windows
2013-03-19Let escript recognize an encoding comment on the second lineHans Bolinder
The manual says that an Emacs directive can be placed on the second line. With this patch that directive is also recognized when selecting encoding of the script.
2013-03-18Fix a test case bugHans Bolinder
shell_SUITE: Calling i() did not work because if there are more than 100 processes c:i() will go into pager mode, asking for input.
2013-03-18Fix a test case bugHans Bolinder
io_proto_SUITE: node names containing some '-' did not work.
2013-03-18Remove ?line from dets_SUITE.erlHans Bolinder
2013-03-18Adjust dets.erl to cope with an evil test caseHans Bolinder
The test case deletes a Dets process while it is repairing a file. Another client waiting for the Dets process to reply then kicks in and repairs the file. Apparently the temporary file was still open, resulting in an eacces error on Windows.
2013-02-26stdlib: Remove race in ets_SUITE:delete_large_tabSverker Eriksson
2013-02-26stdlib: Remove race in ets_SUITE:delete_large_named_tableSverker Eriksson
2013-02-26stdlib: Ignore symlink tests on windowsDan Gudmundsson
Symlinks only partially works on windows 7, ignore those tests on windows machines for now
2013-02-22Update copyright yearsBjörn-Egil Dahlberg
2013-02-22Merge branch 'pan/unicode_printable_ranges'Patrik Nyblom
* pan/unicode_printable_ranges: Adapt stdlib tests to ~tp detecting latin1 binaries Update primary bootstrap Make wx debugger use +pc flag when applicable Correct misspelled comments and space at lin ends Make ~tp output latin1 binaries as strings if possible Leave the +pc handling to io and io_lib_pretty Remove newly introduced warning in erlexec.c Make shell_SUITE:otp_10302 use +pc unicode when needed Fix io_proto_SUITE to handle the new io_lib_pretty:print Add testcase for +pc and io:printable_range/0 Make printing of UTF-8 in binaries behave like lists. Document +pc flag and io:printable_range/0 Add usage of and spec for io:printable_range/0 Add +pc {latin1|unicode} switch and io:printable_range/0 Fix some Unicode issues OTP-18084
2013-02-19Adapt stdlib tests to ~tp detecting latin1 binariesPatrik Nyblom
2013-02-18Merge branch 'sverk/ets-test-failures'Sverker Eriksson
* sverk/ets-test-failures: stdlib: Try fix fluctuating test cases in ets_SUITE
2013-02-18Correct misspelled comments and space at lin endsPatrik Nyblom
2013-02-18Merge branch 'hb/stdlib/unicode_corrections/OTP-10820' into ↵Patrik Nyblom
pan/unicode_printable_ranges * hb/stdlib/unicode_corrections/OTP-10820: Fix some Unicode issues Conflicts: lib/stdlib/test/shell_SUITE.erl
2013-02-18Make shell_SUITE:otp_10302 use +pc unicode when neededPatrik Nyblom
2013-02-18Fix io_proto_SUITE to handle the new io_lib_pretty:printPatrik Nyblom
2013-02-18Add testcase for +pc and io:printable_range/0Patrik Nyblom
Also fixed otp_10302 to test both on a node with +pc unicode and a node with +pc latin1.
2013-02-18Fix some Unicode issuesHans Bolinder
Also let the Erlang shell use the new function io:printable_range().
2013-02-15[stdlib] Add control sequence modifier 'l'Hans Bolinder
The modifier 'l' can be used for turning off the string recognition of ~p and ~P.
2013-02-14Merge branch 'bjorn/stdlib/filelib-wildcard/OTP-10812'Björn Gustavsson
* bjorn/stdlib/filelib-wildcard/OTP-10812: Remove special case handling "-" at the beginning of a charset Optimize character sets using gb_sets Clean up and simplify the inner matching loop Only sort the result list once, just before returning Replace filename:join/2 with '++' Rethink the filelib:wildcard() functions Don't redefine error/1 Don't allow binaries as the Cwd argument for filelib:wildcard() Don't handle binaries from file:list_dir/1 Strengthen test suite
2013-02-13Extend ~ts to handle binaries with characters coded in ISO-latin-1Hans Bolinder
Make sure io_lib:fwrite() with a format string including "~ts" does not crash when given binaries that cannot be interpreted as UTF-8-encoded strings. We want to avoid crashes caused by excessive use of the 't' modifier.
2013-02-13Don't allow binaries as the Cwd argument for filelib:wildcard()Björn Gustavsson
filelib:wildcard() will no longer support "raw filenames", so it makes no sense for it to accept a binary Cwd argument.
2013-02-13Strengthen test suiteBjörn Gustavsson
2013-02-11[stdlib] Fix a bug concerning pretty printing and UnicodeHans Bolinder
Binaries were pretty printed too often.
2013-02-11Merge branch 'bjorn/remove-tuple-funs/OTP-10170'Björn Gustavsson
* bjorn/remove-tuple-funs/OTP-10170: erl_eval: Don't allow evaluation of {M,F} in the shell
2013-02-10erl_eval: Don't allow evaluation of {M,F} in the shellBjörn Gustavsson
Tuples funs were removed in de7e01c958ff7c9e6da4034a53567a30a4ae5792, but it was still possible to evaluate tuple funs in the shell.
2013-02-10[stdlib] Remove the undocumented 'unicode' option from the scannerHans Bolinder
2013-02-08stdlib: Try fix fluctuating test cases in ets_SUITESverker Eriksson
by removing slave node creation and instead create remote pids, ports and refs synthetically using binary_to_term. Memory leak checks were sometimes failing due to mutating system ETS tables caused by slave node communication.
2013-02-07[stdlib] Fix bugs in eval_bitsHans Bolinder
Unicode related.
2013-01-31Test calling deprecated or removed functionsBjörn Gustavsson
2013-01-31Test deprecating list_to_atom/1 to cover more codeBjörn Gustavsson
2013-01-31Cover binary syntax errors and warningsBjörn Gustavsson
2013-01-31Test a few more kinds of illegal guard expressionsBjörn Gustavsson
2013-01-31Provoke basic semantic errors to improve test coverageBjörn Gustavsson
2013-01-25Update copyright yearsBjörn-Egil Dahlberg