Skip to main content
  • Home
  • login
  • Browse the archive

    swh mirror partner logo
swh logo
SoftwareHeritage
Software
Heritage
Mirror
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

  • 12e77f1
  • /
  • test
  • /
  • recipes
  • /
  • 20-test_legacy_okay.t
Raw File
Permalinks

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
content badge Iframe embedding
swh:1:cnt:183499f3fd93f97e8a4a30681a9f383d2f6e0c56
directory badge Iframe embedding
swh:1:dir:8c0fd2d66c3fe59bddf9127d99f5a9b1a315794e
20-test_legacy_okay.t
#! /usr/bin/env perl
# Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved.
#
# Licensed under the Apache License 2.0 (the "License").  You may not use
# this file except in compliance with the License.  You can obtain a copy
# in the file LICENSE in the source distribution or at
# https://www.openssl.org/source/license.html

use strict;
use warnings;

use OpenSSL::Test;

setup("test_legacy");

plan tests => 3;

ok(run(app(['openssl', 'rand', '-out', 'rand.txt', '256'])), "Generate random file");

ok(run(app(['openssl', 'dgst', '-sha256', 'rand.txt'])), "Generate a digest");

ok(!run(app(['openssl', 'dgst', '-sha256', '-propquery', 'foo=1',
             'rand.txt'])), "Fail to generate a digest");

ENEA — Copyright (C), ENEA. License: GNU AGPLv3+.
Legal notes  ::  JavaScript license information ::  Web API

back to top