Skip to content
Snippets Groups Projects
Select Git revision
  • cdb670c091e7627e3f230f771818faff2b563d2f
  • main default protected
  • f-jdk-update
  • f-overview
  • f-linkahead-rename
  • dev protected
  • f-remote-path
  • f-full-ak-uploadFile
  • f-pipeline-test
  • f-cxx-include
  • cxxwrap-bugreport
  • v0.0.5
  • v0.0.4
  • v0.0.3
  • v0.0.2
15 results

runtests.jl

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    runtests.jl 1.48 KiB
    # ** header v3.0
    # This file is a part of the CaosDB Project.
    #
    # Copyright (C) 2021 Indiscale GmbH <info@indiscale.com>
    # Copyright (C) 2021 Florian Spreckelsen <f.spreckelsen@indiscale.com>
    #
    # This program is free software: you can redistribute it and/or modify
    # it under the terms of the GNU Affero General Public License as
    # published by the Free Software Foundation, either version 3 of the
    # License, or (at your option) any later version.
    #
    # This program is distributed in the hope that it will be useful, but
    # WITHOUT ANY WARRANTY; without even the implied warranty of
    # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    # Affero General Public License for more details.
    #
    # You should have received a copy of the GNU Affero General Public
    # License along with this program. If not, see
    # <https://www.gnu.org/licenses/>.
    #
    # ** end header
    #
    using Test
    using CaosDB
    
    @testset "CaosDBUnitTests" begin
        @testset "TestUtility" begin
            if haskey(ENV, "SHELL")
                shell_var = ENV["SHELL"]
            else
                shell_var = "default"
            end
            @test CaosDB.Utility.get_env_var("SHELL", "default") == shell_var
        end
        
        @testset "TestExceptions" begin
            @test CaosDB.Exceptions.evaluate_return_code(Cint(0)) == nothing
            @test_throws CaosDB.Exceptions.CaosDBException CaosDB.Exceptions.evaluate_return_code(Cint(14))
            @test_throws CaosDB.Exceptions.GenericCaosDBException CaosDB.Exceptions.evaluate_return_code(Cint(14))
        end
    end