Commit Graph

10 Commits

Author SHA1 Message Date
Zoltan Somogyi
c02eb5163e Carve io.{call_system,environment}.m out of io.m.
library/io.call_system.m:
    Move the code in the "system access predicates" section of io.m
    to this new module.

library/io.environment.m:
    Move the predicates dealing with environment variables in io.m
    to this new module.

library/io.m:
    Delete the code moved to the new modules.

    Leave behind in io.m "forwarding predicates", predicates that do nothing
    except call the moved predicates in the new modules, to provide backward
    compatibility. But do mark the forwarding predicates as obsolete,
    to tell people to update their (at their leisure, since the obsoleteness
    warning can be turned off).

    Also leave behind in io.m the definitions of the types used
    by some parameters of some of the moved predicates.

library/MODULES_DOC:
    List the new modules among the documented modules.

library/library.m:
    List the new modules, including io.file.m (added in a previous change)
    among the documented standard library modules.

NEWS:
    Announce the changes.

browser/browse.m:
browser/interactive_query.m:
compiler/fact_table.m:
compiler/handle_options.m:
compiler/make.module_target.m:
compiler/mercury_compile_main.m:
compiler/module_cmds.m:
compiler/optimize.m:
compiler/options_file.m:
deep_profiler/conf.m:
deep_profiler/mdprof_cgi.m:
deep_profiler/mdprof_test.m:
library/io.file.m:
mdbcomp/trace_counts.m:
ssdb/ssdb.m:
tests/general/environment.m:
tests/hard_coded/closeable_channel_test.m:
tests/hard_coded/setenv.m:
tests/hard_coded/system_sort.m:
    Call the moved predicates directly in their new modules,
    not indirectly through io.m.
2022-03-08 09:38:27 +11:00
Julien Fischer
e73d30ad85 More documentation of expected outputs.
tests/general/environment.m:
tests/general/read_dir_regression.m:
tests/general/string_format_tests.m:
tests/general/test_parsing_utils.m:
tests/general/test_string_to_int_overflow.m:
    As above.
2018-09-11 16:42:32 +10:00
Julien Fischer
f3bc84fdfa Fix failing test cases in the java grade.
tests/general/environment.m:
    Catch the exception that is thrown if io.set_environment_var/4 cannot
    modify the environment -- this is always the case for Java -- and print
    out what the exception is.  This avoids the stack trace that would otherwise
    be printed.

    Update the coding style in this test.

tests/general/environment.exp2:
    Add an alternative expected output for systems that do not support
    modifying the environment.

tests/general/Mmakefile:
    Shift the 'environment' test case to the list of those that
    require catching exceptions to be supported.

tests/general/float_roundtrip.exp2:
tests/hard_coded/deep_copy.exp4:
    Add new expected outputs to account for differences in the way floats are
    printed.

tests/hard_coded/dir_test.exp4:
tests/warnings/singleton_test.exp3:
    Update these expected outputs.
2016-02-07 16:02:13 +11:00
Zoltan Somogyi
33eb3028f5 Clean up the tests in half the test directories.
tests/accumulator/*.m:
tests/analysis_*/*.m:
tests/benchmarks*/*.m:
tests/debugger*/*.{m,exp,inp}:
tests/declarative_debugger*/*.{m,exp,inp}:
tests/dppd*/*.m:
tests/exceptions*/*.m:
tests/general*/*.m:
tests/grade_subdirs*/*.m:
tests/hard_coded*/*.m:
    Make these tests use four-space indentation, and ensure that
    each module is imported on its own line. (I intend to use the latter
    to figure out which subdirectories' tests can be executed in parallel.)

    These changes usually move code to different lines. For the debugger tests,
    specify the new line numbers in .inp files and expect them in .exp files.
2015-02-14 20:14:03 +11:00
Julien Fischer
459847a064 Move the univ, maybe, pair and unit types from std_util into their own
Estimated hours taken: 18
Branches: main

Move the univ, maybe, pair and unit types from std_util into their own
modules.  std_util still contains the general purpose higher-order programming
constructs.

library/std_util.m:
	Move univ, maybe, pair and unit (plus any other related types
	and procedures) into their own modules.

library/maybe.m:
	New module.  This contains the maybe and maybe_error types and
	the associated procedures.

library/pair.m:
	New module.  This contains the pair type and associated procedures.

library/unit.m:
	New module. This contains the types unit/0 and unit/1.

library/univ.m:
	New module. This contains the univ type and associated procedures.

library/library.m:
	Add the new modules.

library/private_builtin.m:
	Update the declaration of the type_ctor_info struct for univ.

runtime/mercury.h:
	Update the declaration for the type_ctor_info struct for univ.

runtime/mercury_mcpp.h:
runtime/mercury_hlc_types.h:
	Update the definition of MR_Univ.

runtime/mercury_init.h:
	Fix a comment: ML_type_name is now exported from type_desc.m.

compiler/mlds_to_il.m:
	Update the the name of the module that defines univs (which are
	handled specially by the il code generator.)

library/*.m:
compiler/*.m:
browser/*.m:
mdbcomp/*.m:
profiler/*.m:
deep_profiler/*.m:
	Conform to the above changes.  Import the new modules where they
	are needed; don't import std_util where it isn't needed.

	Fix formatting in lots of modules.  Delete duplicate module
	imports.

tests/*:
	Update the test suite to confrom to the above changes.
2006-03-29 08:09:58 +00:00
Zoltan Somogyi
ae2ab72716 Compare actual outputs with the outputs computed by NU-Prolog.
Estimated hours taken: 1

runtests:
	Compare actual outputs with the outputs computed by NU-Prolog.

Mmake:
	Enable the dnf test.

commit_bug.m:
	Use more readable formatting.

environment.m:
	Since the expected output may be generated on a different machine
	than the one on which the test is run, don't print the value of
	a possibly machine-specific environment variable such as PATH.

semidet_lambda.m:
	Fix the name of the module.

univ.m:
	Add a couple of tests to exercise the typeinfo comparison routine.

unreachable.m:
	Fix a comment.

*.exp:
	The expected output files.
1996-11-04 07:08:57 +00:00
Fergus Henderson
f3b39ea355 Change the code to reflect the documentation:
Estimated hours taken: 0.1

tests/general/environment.m:
	Change the code to reflect the documentation:
	use PATH, not TERM, as the name of a environment
	variable which should always be set.  (After all,
	when you run the tests from a crontab, TERM doesn't
	get set.)
1996-03-15 14:55:30 +00:00
Fergus Henderson
ae23098f04 Update test suite now that bool is a separate module and
Estimated hours taken: 0.5

Update test suite now that bool is a separate module and
`term_*' is now `term__*'.

tests/general/environment.m:
	Import `bool'.  `std_util__bool_not' is now `bool__not'.

tests/general/interpreter.m:
	Replace `term_' with `term__' where appropriate.

tests/general/set_test.m:
	Fix some bugs in the test case.

tests/general/hello_again.m:
	Avoid `incorrect module name' warning.
1996-02-04 03:26:08 +00:00
Fergus Henderson
993bc1e3cd Apply sed script, since the names of some library entities has
Estimated hours taken: 0.25

tests/general/{environment,interpreter}.m:
	Apply sed script, since the names of some library entities has
	changed.
1996-01-01 12:21:01 +00:00
Andrew Bromage
20c24c6667 Added environment.m 1995-07-31 05:35:08 +00:00