Skip to content
Snippets Groups Projects
Select Git revision
  • 87e63ab1bcbfd380946172e1a3980cc13e02f7c2
  • master default protected
  • streebog
  • gost28147
  • master-updates
  • ed448
  • shake256
  • curve448
  • ecc-sqrt
  • gosthash94cp
  • cmac64
  • block16-refactor
  • siv-mode
  • cmac-layout
  • delete-des-compat
  • delete-rsa_blind
  • aes-struct-layout
  • release-3.4-fixes
  • struct-layout
  • attribute-deprecated
  • rename-data-symbols
  • nettle_3.5.1_release_20190627
  • nettle_3.5_release_20190626
  • nettle_3.5rc1
  • nettle_3.4.1_release_20181204
  • nettle_3.4.1rc1
  • nettle_3.4_release_20171119
  • nettle_3.4rc2
  • nettle_3.4rc1
  • nettle_3.3_release_20161001
  • nettle_3.2_release_20160128
  • nettle_3.1.1_release_20150424
  • nettle_3.1_release_20150407
  • nettle_3.1rc3
  • nettle_3.1rc2
  • nettle_3.1rc1
  • nettle_3.0_release_20140607
  • nettle_2.7.1_release_20130528
  • nettle_2.7_release_20130424
  • nettle_2.6_release_20130116
  • nettle_2.5_release_20120707
41 results

nettle-benchmark.c

Blame
  • Forked from Nettle / nettle
    Source project has a limited visibility.
    testsuite.in 1.52 KiB
    START_MARKER
    dnl add_include_path
    dnl add_module_path
    dnl add_program_path
    
    test_eq(basename("/a/b"),"b")
    test_eq(basename("/a/"),"")
    test_eq(basename("/a"),"a")
    test_eq(basename("/"),"")
    test_eq(basename("a/b"),"b")
    test_eq(basename("a/"),"")
    test_eq(basename("a"),"a")
    test_eq(basename(""),"")
    
    test_eq(dirname("/a/b/"),"/a/b")
    test_eq(dirname("/a/b"),"/a")
    test_eq(dirname("/a/"),"/a")
    test_eq(dirname("/a"),"/")
    test_eq(dirname("/"),"/")
    test_eq(dirname(""),"")
    test_eq(dirname("a/b/"),"a/b")
    test_eq(dirname("a/b"),"a")
    test_eq(dirname("a/"),"a")
    test_eq(dirname("a"),"")
    
    test_eq( catch(error("x"))[0], "x" )
    test_eq( catch(error("X"))[1][0]->fun, master()->_main )
    test_eq( catch(error("%x", 10))[0], "a" )
    test_eval_error( error("%s", 0) )
    
    test_true( true )
    test_false( false )
    test_do( bool x=true; )
    test_do( bool x=false; )
    
    dnl is_absolute_path
    dnl normalize_path
    dnl putenv
    dnl remove_include_path
    dnl remove_module_path
    dnl remove_program_path
    
    dnl master()->set_inhibit_compile_errors
    test_any([[
      master()->set_inhibit_compile_errors(lambda(){});
      mixed res = catch{compile_string("dfasfqw123");};
      master()->set_inhibit_compile_errors(0);
      return arrayp(res)||objectp(res);
    ]], 1)
    
    // - pike -e
    test_false( Process.system(RUNPIKE + " -e \"return 0;\"") )
    test_true( Process.system(RUNPIKE + " -e \"return 1;\"") )
    test_true( Process.system(RUNPIKE + " -e \"return NOT(0);\"") )
    test_true( Process.system(RUNPIKE + " -e \"return CHAR(A)==65;\"") )
    test_eq( Process.popen(RUNPIKE + " -e \"return (string)7;\""), "7\n" )
    
    END_MARKER