aboutsummaryrefslogtreecommitdiff
path: root/test/cli.zig
AgeCommit message (Collapse)Author
2020-12-08add std.testing.expectStringEndsWithAndrew Kelley
2020-10-16zig fmt: write modified files to stdout not stderrIsaac Freund
2020-09-30fix the cli test expected string to support native path separatorsAndrew Kelley
2020-09-26stage2: implement -fno-emit-binAndrew Kelley
we are now passing the cli tests
2020-09-26implement -femit-asm, -femit-docs, -femit-llvm-ir, etcAndrew Kelley
These CLI options are now forwarded to the stage1 backend. We're not going to support the -mllvm CLI option any longer. As a compromise, we unconditionally tell LLVM to output intel x86 syntax when using -femit-asm. Simplify stage1 logic; it no longer has the concept of an output directory. --output-dir is no longer a valid CLI option. cmake uses the `-femit-bin=[path]` option. Note the changes to test/cli.zig. This breaks the CLI API that Godbolt is using so we're going to want to open a PR to help them upgrade to the new CLI for the upcoming Zig 0.7.0 release.
2020-09-25update test case for init-exe with respect to new templateAndrew Kelley
Now it uses std.log.info instead of std.debug.print
2020-06-20Add 'no changes' test to zig fmt cli testRyan Liptak
2020-06-20Simplify unformatted code in zig fmt cli testRyan Liptak
2020-06-20Add zig fmt test to cli tests for both files and directoriesRyan Liptak
Should catch basic `zig fmt` regressions that were previously going uncaught and breaking things
2020-03-30std lib API deprecations for the upcoming 0.6.0 releaseAndrew Kelley
See #3811
2020-03-18fix swapped logic for WindowsAndrew Kelley
Remove `std.fs.deleteTree`. Callers instead should use `std.fs.cwd().deleteTree`. Add `std.fs.deleteTreeAbsolute` for when the caller has an absolute path.
2020-03-03update cli test to new std.fs APIAndrew Kelley
2020-02-28remove special darwin os version min handlingAndrew Kelley
now it is integrated with zig's target OS range.
2020-02-28update tests to new Target APIAndrew Kelley
2020-01-30Convert a few more page_allocatorBenjamin Feng
2019-12-08std.fmt.format: tuple parameter instead of var argsAndrew Kelley
2019-11-29more test regression fixesAndrew Kelley
2019-11-25rename std.heap.direct_allocator to std.heap.page_allocatorAndrew Kelley
std.heap.direct_allocator is still available for now but it is marked deprecated.
2019-11-24update cli testAndrew Kelley
2019-10-21test runner: restore previous behavior of printing all tests passedAndrew Kelley
2019-10-19Use 8192 sized buffers and remove allocator parametersstratact
2019-10-17improve progress reportingAndrew Kelley
* use erase rest of line escape code. * use `stderr.supportsAnsiEscapeCodes` rather than `isTty`. * respect `--color off` * avoid unnecessary recursion * add `Progress.log` * disable the progress std lib test since it's noisy and uses `time.sleep()`. * enable/integrate progress printing with the default test runner
2019-09-24Create user-specified `output-dir`Jay Weisskopf
Fixes #2637
2019-06-22heap: make one global instance of DirectAllocatorSahnvour
it is now stateless, so the de/init are not necessary anymore
2019-06-09different array literal syntax when inferring the sizeAndrew Kelley
old syntax: []i32{1, 2, 3} new syntax: [_]i32{1, 2, 3} closes #1797
2019-05-26clean up references to osAndrew Kelley
2019-03-10Merge remote-tracking branch 'origin/master' into llvm8Andrew Kelley
2019-03-08breaking changes to zig build API and improved cachingAndrew Kelley
* in Zig build scripts, getOutputPath() is no longer a valid function to call, unless setOutputDir() was used, or within a custom make() function. Instead there is more convenient API to use which takes advantage of the caching system. Search this commit diff for `exe.run()` for an example. * Zig build by default enables caching. All build artifacts will go into zig-cache. If you want to access build artifacts in a convenient location, it is recommended to add an `install` step. Otherwise you can use the `run()` API mentioned above to execute programs directly from their location in the cache. Closes #330. `addSystemCommand` is available for programs not built with Zig build. * Please note that Zig does no cache evicting yet. You may have to manually delete zig-cache directories periodically to keep disk usage down. It's planned for this to be a simple Least Recently Used eviction system eventually. * `--output`, `--output-lib`, and `--output-h` are removed. Instead, use `--output-dir` which defaults to the current working directory. Or take advantage of `--cache on`, which will print the main output path to stdout, and the other artifacts will be in the same directory with predictable file names. `--disable-gen-h` is available when one wants to prevent .h file generation. * `@cImport` is always independently cached now. Closes #2015. It always writes the generated Zig code to disk which makes debug info and compile errors better. No more "TODO: remember C source location to display here" * Fix .d file parsing. (Fixes the MacOS CI failure) * Zig no longer creates "temporary files" other than inside a zig-cache directory. This breaks the CLI API that Godbolt uses. The suggested new invocation can be found in this commit diff, in the changes to `test/cli.zig`.
2019-02-09Merge remote-tracking branch 'origin/master' into llvm8Andrew Kelley
2019-02-08std.debug.assert: remove special case for test buildsAndrew Kelley
Previously, std.debug.assert would `@panic` in test builds, if the assertion failed. Now, it's always `unreachable`. This makes release mode test builds more accurately test the actual code that will be run. However this requires tests to call `std.testing.expect` rather than `std.debug.assert` to make sure output is correct. Here is the explanation of when to use either one, copied from the assert doc comments: Inside a test block, it is best to use the `std.testing` module rather than assert, because assert may not detect a test failure in ReleaseFast and ReleaseSafe mode. Outside of a test block, assert is the correct function to use. closes #1304
2019-02-07Merge remote-tracking branch 'origin/master' into llvm8Andrew Kelley
2019-02-07fixups, and modify std.mem.join and std.os.path.resolve APIAndrew Kelley
* zig fmt * std.mem.join takes a slice of slices instead of var args * std.mem.join takes a separator slice rather than byte, and always inserts it. Previously it would not insert the separator if there already was one, violating the documented behavior. * std.mem.join calculates exactly the correct amount to allocate and has no call to allocator.shrink() * bring back joinWindows and joinPosix and the corresponding tests. it is intended to be able to call these functions from any OS. * rename std.os.path.resolveSlice to resolve (now resolve takes a slice of slices instead of var args)
2018-11-30std.os.path: remove dependance on std.mem.join;kristopher tate
std/os/child_process.zig: windows test/cli.zig: godbolt; doc/docgen.zig
2018-11-17Merge remote-tracking branch 'origin/master' into llvm8Andrew Kelley
2018-11-13New Zig formal grammar (#1685)Jimmi Holst Christensen
Reverted #1628 and changed the grammar+parser of the language to not allow certain expr where types are expected
2018-11-05fix broken cli test and translate-c: support no-op castAndrew Kelley
2018-10-15Solve the return type ambiguity (#1628)Jimmi Holst Christensen
Changed container and initializer syntax * <container> { ... } -> <container> . { ... } * <exrp> { ... } -> <expr> . { ...}
2018-09-24fix godbolt cli test on non-linux-x86_64 hostsAndrew Kelley
2018-09-24add panic function to godbolt CLI API testAndrew Kelley
2018-09-24add test to cover the CLI API that godbolt is usingAndrew Kelley
closes #1399
2018-09-17remove `zig build --init`. add `zig init-lib` and `zig init-exe`Andrew Kelley
init-lib creates a working static library with tests, and init-exe creates a working hello world with a `run` target. both now have test coverage with the new "cli tests" file. closes #1035