Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tst/template.tst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ gap> tmpdir := Filename( DirectoryTemporary(), "packagemaker-template-tst" );;
gap> if IsDirectoryPath( tmpdir ) then RemoveDirectoryRecursively( tmpdir ); fi;
gap> AUTODOC_CreateDirIfMissing( tmpdir );
true
gap> olddir := AUTODOC_CurrentDirectory();;
gap> olddir := PKGMKR_CurrentDirectory();;
gap> ChangeDirectoryCurrent( tmpdir );;
gap> AUTODOC_CreateDirIfMissing( pkginfo.PackageName );
true
Expand Down
15 changes: 14 additions & 1 deletion tst/utils.g
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,19 @@ BindGlobal( "PKGMKR_ExpectedDir", function( name )
Concatenation( "tst/", name, ".expected" ) );
end );

BindGlobal( "PKGMKR_CurrentDirectory",
function(args...)
local pwd, result, out;
pwd := Filename( DirectoriesSystemPrograms(), "pwd" );
if pwd = fail then
Error("failed to locate 'pwd' tool");
fi;
result := "";
out := OutputTextString( result, true );
Process( DirectoryCurrent(), pwd, InputTextNone(), out, []) ;
return Chomp( result );
end );

BindGlobal( "PKGMKR_GenerateFixture", function( name, answers )
local tempdir, olddir, actualdir;

Expand All @@ -45,7 +58,7 @@ BindGlobal( "PKGMKR_GenerateFixture", function( name, answers )
fi;
AUTODOC_CreateDirIfMissing( tempdir );

olddir := AUTODOC_CurrentDirectory();
olddir := PKGMKR_CurrentDirectory();
ChangeDirectoryCurrent( tempdir );
PackageWizardGenerate( answers : skipGitRepositorySetup := true );
ChangeDirectoryCurrent( olddir );
Expand Down
Loading