]> git.ipfire.org Git - thirdparty/openssl.git/blame - test/recipes/04-test_conf.t
Remove RANDFILE settings from configuration files
[thirdparty/openssl.git] / test / recipes / 04-test_conf.t
CommitLineData
5aaba376
RL
1#! /usr/bin/env perl
2# Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved.
3#
4# Licensed under the Apache License 2.0 (the "License"). You may not use
5# this file except in compliance with the License. You can obtain a copy
6# in the file LICENSE in the source distribution or at
7# https://www.openssl.org/source/license.html
8
9use strict;
10use warnings;
11
12use OpenSSL::Test qw(:DEFAULT data_file);
13use File::Compare qw(compare_text);
14
15setup('test_conf');
16
17my %input_result = (
18 'dollarid_on.conf' => 'dollarid_on.txt',
19 'dollarid_off.conf' => 'dollarid_off.txt',
20);
21
22plan tests => 2 * scalar(keys %input_result);
23
24foreach (sort keys %input_result) {
25 SKIP: {
26 my $input_path = data_file($_);
27 my $expected_path = data_file($input_result{$_});
28 my $result_path = "test_conf-$_-stdout";
29
30 skip "Problem dumping $_", 1
31 unless ok(run(test([ 'confdump', $input_path ],
32 stdout => $result_path)),
33 "dumping $_");
34 is(compare_text($result_path, $expected_path), 0,
35 "comparing the dump of $_ with $input_result{$_}");
36 }
37}