Changeset 7bdcc45 in mainline for kernel/test/print/print5.c


Ignore:
Timestamp:
2010-12-16T16:38:49Z (13 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7837101
Parents:
8e58f94 (diff), eb221e5 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • kernel/test/print/print5.c

    r8e58f94 r7bdcc45  
    11/*
    2  * Copyright (c) 2006 Jakub Jermar
     2 * Copyright (c) 2005 Josef Cejka
    33 * All rights reserved.
    44 *
     
    2727 */
    2828
    29 /** @addtogroup generic
    30  * @{
     29/*
     30 * This test tests several features of the HelenOS
     31 * printf() implementation which go beyond the POSIX
     32 * specification and GNU printf() behaviour.
     33 *
     34 * Therefore we disable printf() argument checking by
     35 * the GCC compiler in this source file to avoid false
     36 * positives.
     37 *
    3138 */
     39#define NVERIFY_PRINTF
    3240
    33 /**
    34  * @file
    35  * @brief Wrapper for explicit 64-bit arguments passed to syscalls.
    36  */
     41#include <print.h>
     42#include <test.h>
    3743
    38 #ifndef KERN_SYSARG64_H_
    39 #define KERN_SYSARG64_H_
    40 
    41 typedef struct {
    42         unsigned long long value;
    43 } sysarg64_t;
    44 
    45 #endif
    46 
    47 /** @}
    48  */
     44const char *test_print5(void)
     45{
     46        TPRINTF("Testing printf(\"%%s\", NULL):\n");
     47        TPRINTF("Expected output: \"(NULL)\"\n");
     48        TPRINTF("Real output:     \"%s\"\n\n", (char *) NULL);
     49       
     50        TPRINTF("Testing printf(\"%%c %%3.2c %%-3.2c %%2.3c %%-2.3c\", 'a', 'b', 'c', 'd', 'e'):\n");
     51        TPRINTF("Expected output: [a] [  b] [c  ] [ d] [e ]\n");
     52        TPRINTF("Real output:     [%c] [%3.2c] [%-3.2c] [%2.3c] [%-2.3c]\n\n", 'a', 'b', 'c', 'd', 'e');
     53       
     54        return NULL;
     55}
Note: See TracChangeset for help on using the changeset viewer.