mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-12-15 16:52:38 +03:00
400d672e81
- RPC: added CLI command to start session - all input bytes goes into RPC, all RPC output goes into VCP - RPC: added command to close session (actually it only notifies transport layer) - RPC: added recursive rmdir - RPC: hard-coded listing for root directory (any, ext, int) - Fixed CLI leak - Fixed furi_record_delete leak - Unit tests: repaired - Unit tests: corrected output - remove excess, change dots with progress spinner - Unit tests: added leak check - Unit tests: SD mount check before start Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
21 lines
461 B
C
21 lines
461 B
C
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <furi.h>
|
|
#include "minunit.h"
|
|
|
|
void test_furi_create_open() {
|
|
// 1. Create record
|
|
uint8_t test_data = 0;
|
|
furi_record_create("test/holding", (void*)&test_data);
|
|
|
|
// 2. Open it
|
|
void* record = furi_record_open("test/holding");
|
|
mu_assert_pointers_eq(record, &test_data);
|
|
|
|
// 3. Close it
|
|
furi_record_close("test/holding");
|
|
|
|
// 4. Clean up
|
|
furi_record_destroy("test/holding");
|
|
}
|