Skip to content

Releases: approvals/ApprovalTests.Java

Added FileUtils.getResolvedPath()

17 Apr 21:49
Compare
Choose a tag to compare

When working with the file ./name.txt:

getAbsolutePath() will resolve this to /path/to/./name.txt

instead of the desired /path/to/name.txt.

getResolvedPath() solves this problem.

Python scripts for remove_abandoned_files and approve_all

10 Apr 21:33
Compare
Choose a tag to compare

Also, temp folder works when running tests in multi-threaded mode

ReadBuffer input no longer modifies newlines or adds them at the end

20 Mar 21:15
Compare
Choose a tag to compare

Also:
Added StringUtils.ensureEnding
Added FileUtils.readFile(file, ensureTrailingNewline = true)

Closes #637

Automatically git-ignore our temp folder

17 Mar 18:03
f951d26
Compare
Choose a tag to compare

Just like ApprovalTests.Python, we now write a .gitignore file into our temp directory, thus consumers of the library don't have to add the folder themselves to their project's gitignore.

Once.runAsync

17 Feb 18:20
0333c12
Compare
Choose a tag to compare

Once now supports running tasks asynchronously.

Bugfix

Downloading the approve_all script now is done asynchronously, meaning it won't affect build times.
Closes #615

Fixes problems with ReporterWithApprovalPower and FirstWorkingReporter

13 Feb 22:40
Compare
Choose a tag to compare

Allow configuration of project base directory

03 Feb 18:37
Compare
Choose a tag to compare

By default, Approvals uses the working directory to find the working directory and its children to find source file and store received and approved files. This is now configurable if your working directory no longer contains the source. You can do this by setting either the system property or system environment variable called APPROVALTESTS_PROJECT_DIRECTORY. Here is an example of doing this when running tests with maven on forks:

<systemPropertyVariables>
    <APPROVALTESTS_PROJECT_DIRECTORY>${project.basedir}</APPROVALTESTS_PROJECT_DIRECTORY>
</systemPropertyVariables>

Reported in #608

Also fixes #612

Add Once object like in Golang

30 Jan 22:38
Compare
Choose a tag to compare

Once.run(() -> ... your code here ...)
Will execute that code once and only once.

Bugfixes for loadWebPage and readBufferedStream

16 Jan 22:24
Compare
Choose a tag to compare

Use UrlConnection in NetUtils instead of Apache HttpClient

16 Jan 15:24
Compare
Choose a tag to compare

As first fix to #607 let's use java's built-in functionality to make web requests.