这是indexloc提供的服务,不要输入任何密码
Skip to content

fix #364: fix increment for when no filename given #561

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 31, 2021

Conversation

stragu
Copy link
Contributor

@stragu stragu commented Mar 30, 2021

This fixes two issues:

  • The default name was "tmap.<default_format>" but if the file already existed, the alternative would base the number increment looking for "tmapXX.<default_format>";
  • The ifelse() was reversed.

This new version fixes them, by starting with a file called "tmap01" and then incrementing properly.
One remaining issue is that the increment would stop at 100 and keep replacing the file named "tmap100", but I assume it would be very unlikely that users would reach that.

I wanted to add a test using expect_snapshot_output() but this would require using testthat suite 3. Are there any plans to move to the latest version?

@mtennekes mtennekes merged commit 6a24d44 into r-tmap:master Mar 31, 2021
@mtennekes
Copy link
Member

Great, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants