1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:57:45 +00:00

AK: Update OptionParser::m_arg_index by substracting skipped args

On argument swapping to put positional ones toward the end,
m_arg_index was pointing at "last arg  index" + "skipped args" +
"consumed args" and thus was pointing ahead of the skipped ones.

m_arg_index now points after the current parsed option arguments.
This commit is contained in:
vincent-rg 2024-02-05 21:47:09 +01:00 committed by Ali Mohammad Pur
parent 8320faf052
commit a9df60ff1c
5 changed files with 382 additions and 2 deletions

View file

@ -688,6 +688,8 @@ if (BUILD_LAGOM)
endif()
# LibCore
lagom_test(../../Tests/LibCore/TestLibCoreArgsParser.cpp)
if ((LINUX OR APPLE) AND NOT EMSCRIPTEN)
lagom_test(../../Tests/LibCore/TestLibCoreFileWatcher.cpp)
lagom_test(../../Tests/LibCore/TestLibCorePromise.cpp LIBS LibThreading)