[A] Added xcode to the CI
This commit is contained in:
parent
98463eb10c
commit
6f8ecf4330
16
.travis.yml
16
.travis.yml
@ -13,8 +13,6 @@ matrix:
|
|||||||
compiler: clang
|
compiler: clang
|
||||||
env: CC=clang
|
env: CC=clang
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Linux / GCC
|
# Linux / GCC
|
||||||
- os: linux
|
- os: linux
|
||||||
sudo: false
|
sudo: false
|
||||||
@ -61,6 +59,20 @@ matrix:
|
|||||||
packages: ['g++-7']
|
packages: ['g++-7']
|
||||||
|
|
||||||
|
|
||||||
|
# OSX / Clang
|
||||||
|
- os: osx
|
||||||
|
osx_image: xcode7.3
|
||||||
|
env: CC=clang
|
||||||
|
|
||||||
|
- os: osx
|
||||||
|
osx_image: xcode8.3
|
||||||
|
env: CC=clang
|
||||||
|
|
||||||
|
- os: osx
|
||||||
|
osx_image: xcode9.3
|
||||||
|
env: CC=clang
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -58,14 +58,9 @@ Output:
|
|||||||
+---+---------+-------------+
|
+---+---------+-------------+
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
### Customize table appearance
|
### Customize table appearance
|
||||||
|
|
||||||
```C
|
```C
|
||||||
#include <stdio.h>
|
|
||||||
#include "fort.h"
|
|
||||||
int main(void)
|
|
||||||
{
|
|
||||||
ft_table_t *table = ft_create_table();
|
ft_table_t *table = ft_create_table();
|
||||||
ft_set_border_style(table, FT_DOUBLE2_STYLE);
|
ft_set_border_style(table, FT_DOUBLE2_STYLE);
|
||||||
/* Set center alignment for the 1st column */
|
/* Set center alignment for the 1st column */
|
||||||
@ -77,16 +72,13 @@ int main(void)
|
|||||||
ft_set_cell_option(table, 0, FT_ANY_COLUMN, FT_COPT_ROW_TYPE, FT_ROW_HEADER);
|
ft_set_cell_option(table, 0, FT_ANY_COLUMN, FT_COPT_ROW_TYPE, FT_ROW_HEADER);
|
||||||
ft_write_ln(table, "Movie title", "Director", "Year", "Rating");
|
ft_write_ln(table, "Movie title", "Director", "Year", "Rating");
|
||||||
|
|
||||||
|
|
||||||
ft_write_ln(table, "The Shawshank Redemption", "Frank Darabont", "1994", "9.5");
|
ft_write_ln(table, "The Shawshank Redemption", "Frank Darabont", "1994", "9.5");
|
||||||
ft_write_ln(table, "The Godfather", "Francis Ford Coppola", "1972", "9.2");
|
ft_write_ln(table, "The Godfather", "Francis Ford Coppola", "1972", "9.2");
|
||||||
ft_write_ln(table, "12 Angry Men", "Sidney Lumet", "1957", "8.8");
|
ft_write_ln(table, "12 Angry Men", "Sidney Lumet", "1957", "8.8");
|
||||||
ft_write_ln(table, "2001: A Space Odyssey", "Stanley Kubrick", "1968", "8.5");
|
ft_write_ln(table, "2001: A Space Odyssey", "Stanley Kubrick", "1968", "8.5");
|
||||||
|
|
||||||
|
|
||||||
printf("%s\n", ft_to_string(table));
|
printf("%s\n", ft_to_string(table));
|
||||||
ft_destroy_table(table);
|
ft_destroy_table(table);
|
||||||
}
|
|
||||||
```
|
```
|
||||||
Output:
|
Output:
|
||||||
```text
|
```text
|
||||||
|
@ -61,13 +61,11 @@ void different_cell_options(void)
|
|||||||
ft_set_cell_option(table, 0, FT_ANY_COLUMN, FT_COPT_ROW_TYPE, FT_ROW_HEADER);
|
ft_set_cell_option(table, 0, FT_ANY_COLUMN, FT_COPT_ROW_TYPE, FT_ROW_HEADER);
|
||||||
ft_write_ln(table, "Movie title", "Director", "Year", "Rating");
|
ft_write_ln(table, "Movie title", "Director", "Year", "Rating");
|
||||||
|
|
||||||
|
|
||||||
ft_write_ln(table, "The Shawshank Redemption", "Frank Darabont", "1994", "9.5");
|
ft_write_ln(table, "The Shawshank Redemption", "Frank Darabont", "1994", "9.5");
|
||||||
ft_write_ln(table, "The Godfather", "Francis Ford Coppola", "1972", "9.2");
|
ft_write_ln(table, "The Godfather", "Francis Ford Coppola", "1972", "9.2");
|
||||||
ft_write_ln(table, "12 Angry Men", "Sidney Lumet", "1957", "8.8");
|
ft_write_ln(table, "12 Angry Men", "Sidney Lumet", "1957", "8.8");
|
||||||
ft_write_ln(table, "2001: A Space Odyssey", "Stanley Kubrick", "1968", "8.5");
|
ft_write_ln(table, "2001: A Space Odyssey", "Stanley Kubrick", "1968", "8.5");
|
||||||
|
|
||||||
|
|
||||||
printf("%s\n", ft_to_string(table));
|
printf("%s\n", ft_to_string(table));
|
||||||
ft_destroy_table(table);
|
ft_destroy_table(table);
|
||||||
}
|
}
|
||||||
|
@ -61,6 +61,14 @@ int main(void)
|
|||||||
{
|
{
|
||||||
int status = 0;
|
int status = 0;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Essential for OSX, because swprintf can fail in case of real unicode
|
||||||
|
* chars.
|
||||||
|
*/
|
||||||
|
#if defined(FT_HAVE_WCHAR)
|
||||||
|
setlocale(LC_CTYPE, "");
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef FORT_WB_TESTING_ENABLED
|
#ifdef FORT_WB_TESTING_ENABLED
|
||||||
status |= run_wb_test_suit();
|
status |= run_wb_test_suit();
|
||||||
fprintf(stderr, "\n");
|
fprintf(stderr, "\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user