approvals / ApprovalTests.cpp

Native ApprovalTests for C++ on Linux, Mac and Windows
https://approvaltestscpp.readthedocs.io/en/latest/
Apache License 2.0
316 stars 51 forks source link

'pbclip not found' when using Clipboard Reporter on older mac #109

Closed emilybache closed 4 years ago

emilybache commented 4 years ago

When I use the clipboard reporter, tests crash with this message:

'sh: pbclip: command not found'

I'm using a slightly older mac, running os version 10.12.6, Sierra.

I set the default reporter to be a ClipboardReporter according to the documentation, this is my main.cpp:

#define APPROVALS_DOCTEST
#include "ApprovalTests.hpp"

#include <memory>
auto defaultReporterDisposer =
        Approvals::useAsDefaultReporter(std::make_shared<ClipboardReporter>());

When I look on the command line, I have commands 'pbcopy' and 'pbpaste' but not 'pbclip'. I wonder if my mac os is too old to have pbclip?

emilybache commented 4 years ago

Sorry about this, I updated to the latest version of Approval tests and the problem vanished.

claremacrae commented 4 years ago

Hi @emilybache - you beat me to it. This was fixed in https://github.com/approvals/ApprovalTests.cpp/releases/tag/v.7.0.0