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
12 changes: 9 additions & 3 deletions src/Common/FoxProCmd.xh
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@

#command DIR <*any*> => __VfpDir( <"any"> )
#command DIRECTORY <*any*> => __VfpDir( <"any"> )

#command CLEAR => __VfpUnsupported("CLEAR")
#command DIR => __VfpDir( "" )
#command DIRECTORY => __VfpDir( "" )

Expand Down Expand Up @@ -675,7 +675,7 @@
#command LABEL <*any*> => __VfpUnsupported("LABEL")

#command CREATE <cmd:CLASS, CLASSLIB, COLOR, CONNECTION, FORM, LABEL, MENU, PROJECT, QUERY, REPORT, SCREEN, STRUCTURE, TRIGGER> <*any*> ;
=> #error This command is not supported: <(udc)>
=> __VfpUnsupported("CREATE " + <(cmd)>)

// supported CREATE commands in FoxProSql.xh
// CREATE CURSOR
Expand All @@ -684,7 +684,7 @@
// CREATE [SQL] VIEW

#command MODIFY <cmd:COMMAND, CLASS, DATABASE, CONNECTION, FILE, FORM, GENERAL, LABEL, MEMO, MENU, PROCEDURE, PROJECT, QUERY, REPORT, SCREEN, STRUCTURE, WINDOW> <*any*> ;
=> #error This command is not supported: <(udc)>
=> __VfpUnsupported("MODIFY " + <(cmd)>)

#ifndef NOASSERT
#command ASSERT <expression> [MESSAGE <cMessageText>] ;
Expand All @@ -695,6 +695,12 @@
#translate VARTYPE(<v>,<1>) => __VfpVarType( {|| <v> }, <1> )

#include "FoxProSql.xh"

#command CLEAR <*any*> => __VfpUnsupported("CLEAR")

#xtranslate RELEASE <cmd:BAR,CLASSLIB,LIBRARY,MENUS,MODULE,PAD,POPUPS,PROCEDURE,WINDOWS> => __VfpUnsupported("RELEASE " + <(cmd)>)
#xtranslate RELEASE <cmd:BAR,CLASSLIB,LIBRARY,MODULE,PAD,PROCEDURE> <*any*> => __VfpUnsupported("RELEASE " + <(cmd)>)

#endif

// EOF
33 changes: 33 additions & 0 deletions src/Runtime/XSharp.VFP.Tests/CommandTests.prg
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,39 @@ BEGIN NAMESPACE XSharp.VFP.Tests
// If we get here without exception, the command is properly absorbed
Assert.True(.T.)
END METHOD

[Fact, Trait("Category", "Commands")];
METHOD ClearVariantsCompile AS VOID
CLEAR
CLEAR CLASS xyz
CLEAR CLASSLIB
CLEAR DLLS
CLEAR FIELDS
CLEAR GETS
CLEAR MACROS
CLEAR MENUS
CLEAR POPUPS
CLEAR PROGRAM
CLEAR PROMPT
CLEAR READ
CLEAR TYPEAHEAD
CLEAR WINDOWS
Assert.True(TRUE)
END METHOD

[Fact, Trait("Category", "Commands")];
METHOD ReleaseVariantsCompile AS VOID
RELEASE BAR xyz
RELEASE CLASSLIB xyz
RELEASE LIBRARY xyz
RELEASE MENUS
RELEASE MODULE xyz
RELEASE PAD xyz
RELEASE POPUPS
RELEASE PROCEDURE xyz
RELEASE WINDOWS
Assert.True(TRUE)
END METHOD
END CLASS

END NAMESPACE