mkdir src1
mkdir src2
mkdir src3
mkdir src3/sub

copy ../projects/simple.gpr simple.gpr
load simple.gpr
dump

# simple package in src2
create_spec Pkg src2/pkg.ads
create_body Pkg src2/pkg.adb
refresh
dump

# spec in src1 should have priority over src2
create_spec Pkg src1/pkg.ads
refresh
dump

# twice the spec in a recursive source dir should raise an error, but
# ignored for now since the one in src1 has priority
create_spec Pkg src3/sub/pkg.ads
create_spec Pkg src3/pkg.ads
refresh
dump

# remove spec in src1: the one in src2 should be visible again
remove src1/pkg.ads
refresh
dump

# remove spec in src2: we should have a warning ans pkg.ads not shown
remove src2/pkg.ads
refresh
dump

# remove one of the two specs in recursive dir
remove src3/pkg.ads
refresh
dump

create_separate Pkg Sub src3/sub/pkg-sub.adb
create_proc_body Pkg.Proc src2/pkg-proc.adb
refresh
dump

unload
