Skip to content
Snippets Groups Projects
Select Git revision
  • 4c658fbfae00580593b9d82a25aee182f313773a
  • master default
  • wip-slh-dsa-sha2-128s
  • master-updates
  • release-3.10-fixes
  • getopt-prototype
  • fix-bcrypt-warning
  • refactor-hmac
  • wip-use-alignas
  • trim-sha3-context
  • fix-gitlab-ci
  • check-fat-emulate
  • delete-digest_func-size
  • slh-dsa-shake-128f-nettle
  • slh-dsa-shake-128s-nettle
  • slh-dsa-shake-128s
  • delete-openpgp
  • ppc64-sha512
  • delete-md5-compat
  • cleanup-hmac-tests
  • ppc64-sha256
  • nettle_3.10.2_release_20250626
  • nettle_3.10.1_release_20241230
  • nettle_3.10_release_20240616
  • nettle_3.10rc2
  • nettle_3.10rc1
  • nettle_3.9.1_release_20230601
  • nettle_3.9_release_20230514
  • nettle_3.8.1_release_20220727
  • nettle_3.8_release_20220602
  • nettle_3.7.3_release_20210606
  • nettle_3.7.2_release_20210321
  • nettle_3.7.1_release_20210217
  • nettle_3.7_release_20210104
  • nettle_3.7rc1
  • nettle_3.6_release_20200429
  • nettle_3.6rc3
  • nettle_3.6rc2
  • nettle_3.6rc1
  • nettle_3.5.1_release_20190627
  • nettle_3.5_release_20190626
41 results

base16-decode.c

Blame
  • 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