Skip to content
Snippets Groups Projects
Select Git revision
  • 7bec628c2e996f9a904edd0b796849b46df853a7
  • main default
2 results

student_test.sh

Blame
  • student_test.sh 361 B
    #!/usr/bin/env bats
    
    # File: student_tests.sh
    # 
    # Create your unit tests suit in this file
    
    @test "Example: check ls runs without errors" {
        run ./dsh <<EOF                
    ls
    EOF
    
        # Assertions
        [ "$status" -eq 0 ]
    }
    
    @test "Change directory to bats" {
    	run ./dsh <<EOF
    cd bats
    EOF
    	[ "$stripped_output" = "$expected_output" ]
    
    	[ "$status" -eq 0]
    }