diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-09-30 12:09:00 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-09-30 12:09:00 +0200 |
| commit | 5e34ba58c0c6821756308c09ddcbf08f8a775f3f (patch) | |
| tree | feea07035af7f527f1a0463162dfa39373b9e7cf /test/create_cli_test.cc | |
| parent | dec7ad14997421accfe0ff9f382f9ffcb4e61ec2 (diff) | |
Add --no-encrypt with the same idea as the previous commit.
Diffstat (limited to 'test/create_cli_test.cc')
| -rw-r--r-- | test/create_cli_test.cc | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/test/create_cli_test.cc b/test/create_cli_test.cc index 8da07d5d5..3ebdcb81b 100644 --- a/test/create_cli_test.cc +++ b/test/create_cli_test.cc @@ -111,6 +111,15 @@ BOOST_AUTO_TEST_CASE (create_cli_test) cc = run ("dcpomatic2_create x --standard SMPTEX"); BOOST_CHECK (cc.error); + cc = run("dcpomatic2_create x --no-encrypt"); + BOOST_CHECK(cc._no_encrypt); + + cc = run("dcpomatic2_create x --encrypt"); + BOOST_CHECK(cc._encrypt); + + cc = run("dcpomatic2_create x --no-encrypt --encrypt"); + BOOST_CHECK(cc.error); + cc = run("dcpomatic2_create x --twod"); BOOST_CHECK(cc._twod); @@ -217,10 +226,14 @@ BOOST_AUTO_TEST_CASE(create_cli_template_test) Config::override_path = "test/data"; - auto cc = run("dcpomatic2_create test/data/flat_red.png --template 2d"); + auto cc = run("dcpomatic2_create test/data/flat_red.png"); auto film = cc.make_film(); BOOST_CHECK(!film->three_d()); + cc = run("dcpomatic2_create test/data/flat_red.png --template 2d"); + film = cc.make_film(); + BOOST_CHECK(!film->three_d()); + cc = run("dcpomatic2_create test/data/flat_red.png --template 2d --threed"); film = cc.make_film(); BOOST_CHECK(film->three_d()); @@ -232,5 +245,25 @@ BOOST_AUTO_TEST_CASE(create_cli_template_test) cc = run("dcpomatic2_create test/data/flat_red.png --template 3d --twod"); film = cc.make_film(); BOOST_CHECK(!film->three_d()); + + cc = run("dcpomatic2_create test/data/flat_red.png"); + film = cc.make_film(); + BOOST_CHECK(!film->encrypted()); + + cc = run("dcpomatic2_create test/data/flat_red.png --template unencrypted"); + film = cc.make_film(); + BOOST_CHECK(!film->encrypted()); + + cc = run("dcpomatic2_create test/data/flat_red.png --template unencrypted --encrypt"); + film = cc.make_film(); + BOOST_CHECK(film->encrypted()); + + cc = run("dcpomatic2_create test/data/flat_red.png --template encrypted"); + film = cc.make_film(); + BOOST_CHECK(film->encrypted()); + + cc = run("dcpomatic2_create test/data/flat_red.png --template encrypted --no-encrypt"); + film = cc.make_film(); + BOOST_CHECK(!film->encrypted()); } |
