Update test and correct IDN implementation
| | |
| | | * @return |
| | | */ |
| | | scpi_result_t SCPI_CoreIdnQ(scpi_t * context) { |
| | | SCPI_ResultString(context, context->idn[0]); |
| | | SCPI_ResultString(context, context->idn[1]); |
| | | SCPI_ResultString(context, context->idn[2]); |
| | | SCPI_ResultString(context, context->idn[3]); |
| | | int i; |
| | | for (i = 0; i<4; i++) { |
| | | if (context->idn[i]) { |
| | | SCPI_ResultString(context, context->idn[i]); |
| | | } else { |
| | | SCPI_ResultString(context, "0"); |
| | | } |
| | | } |
| | | return SCPI_RES_OK; |
| | | } |
| | | |
| | |
| | | CU_ASSERT_STRING_EQUAL(output, output_buffer); \ |
| | | } |
| | | output_buffer_clear(); |
| | | error_buffer_clear(); |
| | | |
| | | /* Test single command */ |
| | | TEST_INPUT("*IDN?\r\n", "MA, IN, 0, VER\r\n"); |
| | |
| | | CU_cleanup_registry(); |
| | | return CU_get_error(); |
| | | } |
| | | |