11#include "launcher.h"
2+ #include "utils.h"
23#include <assert.h>
34#include <stdio.h>
45#include <stdlib.h>
56#include <string.h>
67
78int main ()
89{
10+ assert (hexDecode ('0' ) == 0 );
11+ assert (hexDecode ('1' ) == 1 );
12+ assert (hexDecode ('2' ) == 2 );
13+ assert (hexDecode ('3' ) == 3 );
14+ assert (hexDecode ('4' ) == 4 );
15+ assert (hexDecode ('5' ) == 5 );
16+ assert (hexDecode ('6' ) == 6 );
17+ assert (hexDecode ('7' ) == 7 );
18+ assert (hexDecode ('8' ) == 8 );
19+ assert (hexDecode ('9' ) == 9 );
20+ assert (hexDecode ('a' ) == 10 );
21+ assert (hexDecode ('b' ) == 11 );
22+ assert (hexDecode ('c' ) == 12 );
23+ assert (hexDecode ('d' ) == 13 );
24+ assert (hexDecode ('e' ) == 14 );
25+ assert (hexDecode ('f' ) == 15 );
26+ assert (hexDecode ('A' ) == 10 );
27+ assert (hexDecode ('B' ) == 11 );
28+ assert (hexDecode ('C' ) == 12 );
29+ assert (hexDecode ('D' ) == 13 );
30+ assert (hexDecode ('E' ) == 14 );
31+ assert (hexDecode ('F' ) == 15 );
32+
33+
934 char * command = getScriptCommand ("./tests/Check OTA status v1.1.sh" );
1035 assert (command != NULL );
1136 printf ("Check OTA status v1.1.sh - %s\n" , command );
@@ -19,11 +44,13 @@ int main()
1944 free (command );
2045
2146 printf ("\n\n" );
22- const char * test = "4:app://com.notmarek.shell_integration.launcher./tests/KindleCraft.sh" ;
47+ char * test = strdup ( "4:app://com.notmarek.shell_integration.launcher./tests/KindleCraft.sh" ) ;
2348 go_callback (NULL , "test1" , test , NULL );
2449 printf ("\n\n" );
50+ free (test );
2551
26- test = "4:app://com.notmarek.shell_integration.launcher./tests/Check OTA status v1 .1.sh" ;
52+ test = strdup ( "4:app://com.notmarek.shell_integration.launcher.%2Ftests%2FCheck%20OTA%20status%20v1 .1.sh" ) ;
2753 go_callback (NULL , "test2" , test , NULL );
54+ free (test );
2855 return 0 ;
2956}
0 commit comments