aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/test
AgeCommit message (Collapse)Author
2013-12-12Test named funsAnthony Ramine
2013-10-22Merge branch 'mh/dict_orddict_is_empty/OTP-11353'Fredrik Gustafsson
* mh/dict_orddict_is_empty/OTP-11353: Update primary bootstrap Add dict:is_empty/1 and orddict:is_empty/1
2013-10-14Merge branch 'maint'Fredrik Gustafsson
2013-10-14Merge branch 'fenollp/treewide_remove_unexpected_0xff/OTP-11323' into maintFredrik Gustafsson
* fenollp/treewide_remove_unexpected_0xff/OTP-11323: Remove ^L characters hidden randomly in the code. Not those used in text files as delimiters.
2013-09-30Merge branch 'maint'Fredrik Gustafsson
2013-09-25stdlib: extended binary_module_SUITE to assure badarg for OTP-11350Fredrik Gustafsson
2013-09-13Add dict:is_empty/1 and orddict:is_empty/1Magnus Henoch
dict:size/1 runs in constant time, but orddict:size/1 does not. With this change, the two modules stay API compatible and gain a constant-time function for checking whether a dictionary is empty.
2013-09-12Remove ^L characters hidden randomly in the code. Not those used in text ↵Pierre Fenoll
files as delimiters. While working on a tool that processes Erlang code and testing it against this repo, I found out about those little sneaky 0xff. I thought it may be of help to other people build such tools to remove non-conforming-to-standard characters.
2013-09-06Merge branch 'maint'Fredrik Gustafsson
Conflicts: bootstrap/lib/stdlib/ebin/erl_lint.beam
2013-08-27Fix variable usage tracking in some record errorsAnthony Ramine
When reporting a field redefinition in a record, erl_lint can forget about some old unused variables. f() -> X = 1, #r{a=foo,a=bar,a=qux}.
2013-08-27Fix unsafe variable tracking in try expressionsAnthony Ramine
Variables used in the body of a try expression were marked as unsafe *and* used, which makes no sense as an unsafe variable can't be used. Function vtsubtract/2 is used to forget usage of such unsafe variables. Reported-by: Paul Davis
2013-08-27Fix variable usage tracking in erl_lintAnthony Ramine
When analyzing complex expressions (i.e. comprehensions, cases, tries, ifs and receives), erl_lint does not forget about old unused variables when returning the updated variable table. This causes a bug where old unused variables are not recorded as such: t(X, Y) -> #r{a=[ K || K <- Y ],b=[ K || K <- Y ]}. As erl_lint uses vtmerge_pat/2 to merge the results of the analysis of the two list comprehensions, X is marked as used and the warning is not emitted. The function vtmerge_pat/2 is used instead of the similar vtmerge/2 which does not mark multiple occurrences of a variable as usage to handle cases like the following one: t(X, Y) -> #r{a=A=X,b=A=Y}. Other simpler expressions like conses, tuples and external fun references do not correctly follow this behaviour, e.g. A is not marked as used in the following code: t(X, Y) -> {A=X,A=Y}. This commit fixes both issues and makes erl_lint not return old unused variables in updated tables and makes all compound expressions use vtmerge_pat/2. Reported-by: Anders Ramsell
2013-08-21Merge branch 'maint'Hans Bolinder
* maint: Fix a Dets bug concerning traversal of tables
2013-08-21Merge branch 'hb/stdlib/dets_bugfix/OTP-11245' into maintHans Bolinder
* hb/stdlib/dets_bugfix/OTP-11245: Fix a Dets bug concerning traversal of tables
2013-08-21Merge branch 'maint'Hans Bolinder
* maint: Fix a bug in the linter regarding the 'fun M:F/A' construct
2013-08-20Fix a bug in the linter regarding the 'fun M:F/A' constructHans Bolinder
If the fun M:F/A construct was used erroneously the linter could crash. Thanks to Mikhail Sobolev for reporting the bug.
2013-08-19Fix a Dets bug concerning traversal of tablesHans Bolinder
The bug was introduced in R16B. Thanks to Manuel Durán Aguete.
2013-08-09Add more tests for corner error cases in erl_bif_re.cPatrik Nyblom
2013-08-09Add match_limit and match_limit_recursion optionsPatrik Nyblom
Added to re:run and sets the corresponding fields in 'extra' struct for the PCRE match engine. The result can be viewed by also setting 'report_errors' when matching. Some housekeeping was also done... The offset option also did not properly check for offset's >= 0. Change nomatch to BADARG when pre-compiled mp() is faked: By constructing a 5-tuple with faked content but the right data types, you could do a re:run which returned nomatch when in fact the mp() was bad. The cheapest solution is to check the return from pcre_exec better. Remove unreachable code in erts_bif_re.c: Replaced tests for things that logically simply cannot happen with ASSERT.
2013-08-09Add return_errors option to re:run/3Patrik Nyblom
2013-08-09Add new options to Erlang re interface and mend dupnamesPatrik Nyblom
Add notempty_atstart, no_start_optimize, ucp and never_utf options from new PCRE version. Use the new notempty_atstart in global matching. Add inspect/2 function Correctly handle dupnames when capturing a name, as in Perl, get the leftmost matching occurence. Also added all_names, to get all the names in the pattern in alphabetical (name) order. To be able to use this in global matching, an inspect function that can dig out a namelist was added.
2013-08-06Integrate new PCRE test suitesPatrik Nyblom
The relevant testoutputNN files were copied from the PCRE distribution and some corrections were done to run_pcre_tests.erl. Also made test generator be more compiler friendly The re_testoutput1_replacement_test and re_testoutput1_split_test modules that are generated by run_pcre_tests.erl (offline, when a new version of PCRE is integrated in the VM) took forever to compile, as one single huge function contained all the tests. The autogenerated tests are now split into ~50 functions, which reduces compile time to approximately a third. New automatic test suites are also generated from the new testoutputNN files, and checked in.
2013-06-26Merge branch 'nox/illegal-bitstring-gen-pattern/OTP-11186'Fredrik Gustafsson
* nox/illegal-bitstring-gen-pattern/OTP-11186: Bootstrap added Simplify v3_core's translation of bit string generators Forbid unsized fields in patterns of binary generators
2013-06-12Merge branch 'maint'Björn-Egil Dahlberg
2013-06-12Update copyright yearsBjörn-Egil Dahlberg
2013-06-05Merge branch 'maint'Patrik Nyblom
2013-06-05Merge branch 'pan/unicode_error_wrong_offset' into maintPatrik Nyblom
* pan/unicode_error_wrong_offset: Fix faulty rest on error in unicode:characters_to_list OTP-11080
2013-06-05Forbid unsized fields in patterns of binary generatorsAnthony Ramine
It makes no sense to be able to do `<<...,Rest/binary>> <= ...` in a comprehension. The related Dialyzer test is removed.
2013-06-04Merge branch 'maint'Rickard Green
* maint: stdlib: Fix ets_SUITE memory tests
2013-06-04Merge branch 'rickard-sverker/carrier-migration/OTP-10279' into maintRickard Green
* rickard-sverker/carrier-migration/OTP-10279: stdlib: Fix ets_SUITE memory tests
2013-06-04stdlib: Fix ets_SUITE memory testsRickard Green
Need to take 'mbcs_pool' into account.
2013-06-04Merge branch 'maint'Fredrik Gustafsson
Conflicts: bootstrap/lib/stdlib/ebin/erl_pp.beam
2013-06-04Merge branch 'nox/erl_pp-callback/OTP-11140' into maintFredrik Gustafsson
* nox/erl_pp-callback/OTP-11140: Update primary bootstrap Support callback attributes in erl_pp
2013-06-04Merge branch 'maint'Rickard Green
* maint: erts: Document the +M<S>acul command line argument erts: Carrier pool information in allocator information erts: Use carrier pool for migration of carriers erts: Implement test case for carrier pool erts: Implement carrier pool erts: Fix type errors in info functions erts: Use Uint64 for call counts erts: Fix failing testcase alloc_SUITE:rbtree erts: Rename allocator aoffcbf to aoffcaobf erts: Remove unnecessary flag arguments in allocators erts: Remove SBMBC allocator erts: Add test for add_mbc and remove_mbc callbacks erts: Fix deallocation in removed carrier erts: Change naive list to rb-tree of carriers in AOFF allocator erts: Prepare aoff allocator for carrier migration erts: Make carrier header sizes customizable erts: Add "bestfit within carrier" for aoff allocator (aoffcbf) Conflicts: erts/preloaded/ebin/erlang.beam
2013-06-03erts: Remove SBMBC allocatorSverker Eriksson
2013-05-29Merge branch 'maint'Fredrik Gustafsson
2013-05-28Support callback attributes in erl_ppAnthony Ramine
2013-05-22Teach c:ls/1 to show non-directory filesBjörn Gustavsson
In an email to erlang-questions, Bengt Kleberg wrote: When I use c:ls/1 it reminds me so much of Unix "ls" that I expect c:ls("filename") to work. The resulting error surprises me every time (not the same day). While teaching c:ls/1 to show non-directory files, update the error handling to make use of the POSIX error codes from file:list_dir/1 and file:format_error/1 (which had not been invented when the c module was first implemented). Suggested-by: Bengt Kleberg Test-suite-by: Bengt Kleberg
2013-05-17Merge branch 'maint'Siri Hansen
2013-05-17Merge branch 'siri/cuddle-with-tests' into maintSiri Hansen
* siri/cuddle-with-tests: Fix gen_server_SUITE:call_with_huge_message_queue Fix zip_SUITE:borderline test
2013-05-17Merge branch 'maint'Hans Bolinder
* maint: [stdlib] Fix pretty printing of invalid forms
2013-05-16[stdlib] Fix pretty printing of invalid formsHans Bolinder
Thanks to Tomáš Janoušek.
2013-05-06Merge branch 'maint'Fredrik Gustafsson
2013-05-06Merge branch 'sverk/ets-test-cuddle' into maintSverker Eriksson
* sverk/ets-test-cuddle: stdlib: Make memcheck in ets_SUITE less sensitive
2013-05-06Fix a minor bug in ets:tabfile_info() and ets:file2tab()Hans Bolinder
Certain error conditions could leave an open file descriptor.
2013-05-03Merge branch 'maint'Fredrik Gustafsson
Conflicts: bootstrap/lib/stdlib/ebin/epp.beam
2013-05-03Merge branch 'nox/fix-epp-file-attrs/OTP-11079' into maintFredrik Gustafsson
* nox/fix-epp-file-attrs/OTP-11079: Fix an inconsistent state in epp
2013-05-03Fix gen_server_SUITE:call_with_huge_message_queueSiri Hansen
This test always fails when gen is native compiled, since the optmization is not implemented then. The test is now skipped when running with hipe. The test does also quite often fail on one of the test hosts which runs in a virtual machine. The reason is that the clock runs "in bursts" on this host, which is outside of the control of the erlang VM and probably due to the fact that the host runs as a virtual machine. To overcome this problem, the echo message is now sent 10000 times instead of 10 times - i.e. the test run is prolonged in order to even out the effect of the bursts.
2013-05-02Fix faulty rest on error in unicode:characters_to_listPatrik Nyblom
2013-05-02Fix zip_SUITE:borderline testSiri Hansen
This test fails on a test host where no proper unix unzip is installed. This has been corrected.