diff -r 5b2eab065888 -r b06038904ef8 libraries/iosrv/client/command_info_file.cpp --- a/libraries/iosrv/client/command_info_file.cpp Thu Sep 09 19:21:34 2010 +0100 +++ b/libraries/iosrv/client/command_info_file.cpp Wed Sep 15 00:44:34 2010 +0100 @@ -27,6 +27,7 @@ _LIT(KCmndLongDescription, "long-description"); _LIT(KCmndSeeAlso, "see-also"); _LIT(KCmndCopyright, "copyright"); +_LIT(KCmndSmokeTest, "smoke-test"); _LIT(KCmndArgument, "argument"); _LIT(KCmndOption, "option"); _LIT(KCmndInclude, "include"); @@ -315,6 +316,23 @@ { iCopyright.Set(TextToNextCommand(aLex)); } + else if (command == KCmndSmokeTest) + { + // Hmm no easy way to get the line number we're currently on + iSmokeTestLineNumber = 1; + TLex lex(aLex); + lex.Inc(-aLex.Offset()); // Only way to put a TLex back to the beginning! + TPtrC preceding = lex.Remainder().Left(aLex.Offset()); + const TUint16* ptr = preceding.Ptr(); + const TUint16* end = ptr + preceding.Length(); + while (ptr != end) + { + if (*ptr++ == '\n') iSmokeTestLineNumber++; + } + // At this point iSmokeTestLineNumber points to the "==smoketest" line - add 2 to skip this line and the blank line below it + iSmokeTestLineNumber += 2; + iSmokeTest.Set(TextToNextCommand(aLex)); + } else if (command == KCmndArgument) { ReadArgumentL(aLex, aFileName); @@ -813,6 +831,16 @@ return iCopyright; } +EXPORT_C const TDesC& CCommandInfoFile::SmokeTest() const + { + return iSmokeTest; + } + +EXPORT_C TInt CCommandInfoFile::GetSmokeTestStartingLineNumber() const + { + return iSmokeTestLineNumber; + } + EXPORT_C const RCommandArgumentList& CCommandInfoFile::Arguments() { return iArguments; @@ -891,3 +919,8 @@ : iFileName(aParent.iFileName), iParent(&aParent) { } + +EXPORT_C const TDesC& CCommandInfoFile::CifFileName() const + { + return iFileName; + }