test_complex Subroutine

public subroutine test_complex()

Arguments

None

Calls

proc~~test_complex~~CallsGraph proc~test_complex test_complex assertequal assertequal proc~test_complex->assertequal none~append DirPath%append proc~test_complex->none~append none~find~37 DirPath%find proc~test_complex->none~find~37 push_back push_back none~append->push_back begin begin none~find~37->begin get get none~find~37->get next next none~find~37->next

Source Code

   subroutine test_complex()
      type (DirPath) :: path
      character(len=:), allocatable :: full_name
      integer :: status

      call path%append('dir1')
      call path%append('dir1/dir3')
      call path%append('dir2')

      full_name = path%find('exist.dat', rc=status)
      @assertEqual(0, status)
      @assertEqual('dir1/exist.dat', full_name)

      full_name = path%find('exist2.dat', rc=status)
      @assertEqual(0, status)
      @assertEqual('dir2/exist2.dat', full_name)

      full_name = path%find('exist3.dat', rc=status)
      @assertEqual(0, status)
      @assertEqual('dir1/dir3/exist3.dat', full_name)


   end subroutine test_complex