From 5bd7099b96e8a65e45321b04b5da12b56f753f78 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Wed, 16 Aug 2023 10:42:53 +0300 Subject: [PATCH] Shell: add basic printf test --- userspace/Shell/main.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/userspace/Shell/main.cpp b/userspace/Shell/main.cpp index 07b46b0c0..b8b31f68e 100644 --- a/userspace/Shell/main.cpp +++ b/userspace/Shell/main.cpp @@ -326,6 +326,15 @@ int execute_command(BAN::Vector& args) return 1; } } + else if (args.front() == "printf-test"sv) + { + printf(" 0.0: %f\n", 0.0f); + printf(" 123.0: %f\n", 123.0f); + printf(" 0.123: %f\n", 0.123f); + printf(" NAN: %f\n", NAN); + printf("+INF: %f\n", INFINITY); + printf("-INF: %f\n", -INFINITY); + } else if (args.front() == "cd"sv) { if (args.size() > 2)